07-30-2024 11:10 PM
Hello Everyone,
Could you please tell me that how to debug custom snap in the editor before deployment of snap while snap development ? Currently I am developing one custom snap while developing snap I deploy snap after every little changes So, Is there any way to debug custom snap in editor instead of deployment of snap for debugging for every changes ?
07-30-2024 11:43 PM
Hi @Ganeshu108,
The best way for the development process is to setup a Snaplex (explained here: Snap Development Documentation (snaplogic.com)) on your local machine where you will be able to run the pipelines.
When a local Snaplex is configured, you can run the snaplex in debug mode explaned here:
Following this, you can attach a remote debugger in your IDE and after all of this you can just run/validate a pipeline with your custom snap and the execution will stop on an added break point in your code.
Kind regards,
Bojan
08-05-2024 11:04 PM
Hi @bojan_manchev,
As you said I have gone through that documentation and did configuration according to it, But still I am getting following error. Debugger is not able to connect port 8000. It is showing error as below screen shot So, Could please explain that what is exactly cause of error ?
08-07-2024 12:34 AM
Hi @Ganeshu108,
This error usually occurs when the port 8000 is already taken or in use. You can restart the snaplex using different port like 9000. For the debugging I am starting the snaplex using this command:
"C:\Program Files\Java\jdk-11\bin\java" -agentlib:jdwp=transport=dt_socket,server=y,address=9000,suspend=n -jar C:\opt\snaplogic\run\lib\jcc.war jcc
And the remote debugger configuration is this: