Yes, it is possible, and it’s how I debug my Java actions.
Firstly, follow the instructions for step 2 on this page. It tells you how to setup Mendix to talk to a remote Java debugger.
https://docs.mendix.com/howto/monitoring-troubleshooting/debug-java-actions-remotely
In VSCode, make sure you have the “Debugger for Java” from Microsoft installed.
https://code.visualstudio.com/blogs/2017/09/28/java-debug
Once you’ve followed the instructions in that link, edit your launch.json and add the following to your configurations.
{
"type": "java",
"name": "Remote Mendix",
"request": "attach",
"hostName": "localhost",
"port": 5005
}
When you use the debugger in VS Code, you’ll now have an option for “Remote Mendix” to connect to your Mendix application with.
Hope this helps.
Hi Luan,
I’ve never tried this in VSCode, but you can certainly export your project for eclipse (https://docs.mendix.com/refguide/using-eclipse), and run it from there using an Eclipse debug configuration to debug custom java. That’s the process that we normally follow.
I hope this helps!
Thanks,
Conner
Did you manage to integrate VSCode with opening running and debugging mendix apps? It would help alot if you can explain, I am getting errors at the moment with libraries not being recognized by VSCode. The same project is compiled fine in Eclipse. I also prefer Code, also because I can use it also for Javascript.