简体   繁体   English

从IntelliJ Java自动进行C ++调试

[英]Automating C++ debugging from IntelliJ Java

Currently, when working on a project with mixed Java and C++ code, I have to run the application in IntelliJ and manually attach the CLion debugger to the JVM process. 当前,在处理Java和C ++混合代码的项目时,我必须在IntelliJ中运行该应用程序,并将CLion调试器手动附加到JVM进程。

Is there a way to automate these steps so that I can run the application from IntelliJ and a CLion or Visual Studio debugger is automatically attached? 有没有一种方法可以自动执行这些步骤,以便可以从IntelliJ运行应用程序,并自动附加CLion或Visual Studio调试器?

I suspect this may only be possible with a plugin similar to how VisualVM is integrated with IntelliJ. 我怀疑这只能通过类似于VisualVM与IntelliJ集成的插件才能实现。

Depends on how your Java and C++ code interacts. 取决于Java和C ++代码如何交互。

If it's a JNI library, you can create a run configuration for CLion where the Java process is the executable , and C++ library is being debugged. 如果它是JNI库,则可以为CLion创建运行配置 ,其中Java进程是可执行文件 ,并且正在调试C ++库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM