Question

I am working on a web-app front end (spring mvc) which depends on war file (created also by me).

Both module web and core communicate via REST (Jersey). Both modules are separate maven projects.

On some occasions during development I screw up something in the core and exception is thrown. Many times I need to setup a breakpoint there and trap the issue.

The problem is: I start the debug when running the web-app fine. But will never stop on any breakpoint in core (doooh). (core is build using maven package command, to generate war file).

I could start only the core and debug it. Problem some complex functions expect many attributes (form object json format).

Any ideas?

Tnx

Was it helpful?

Solution

Start the core on debug mode, if you can do this in your IDE then you are all set, otherwise you can set up your IDE for remote debugging, There are instructions to do this for popular Ide's. Set up for eclipse, Set up for Intellij

OTHER TIPS

You can debug the core and start web-app regularly and make it send the request you want to debug on the core side.

Have the core source code open in your IDE. Configure it for remote debug of the JVM that the servlet container/app server is running the app. Enable remote debugging on the servlet container/app server. Start the server, start the remote debugging in the IDE. Set a break point and enjoy.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top