cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug custom snap in editor before snap deployment

Ganeshu108
New Contributor II

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 ?

3 REPLIES 3

bojan_manchev
New Contributor II

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: 

https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439068/Configuration+Options#JCC-Node-Deb...

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

 

 

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  ?

Ganeshu108_0-1722924089153.png

 

bojan_manchev
New Contributor II

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: 

bojan_manchev_0-1723015969105.png