Cannot break into RESTful service

Answered

 

I have created a very small RESTful project that I need to debug. I have set breakpoints and start the project in debug mode using Tomcat.

I have used Chrome, Postman, and the built in RESTful Test Client with IntelliJ IDEA and I am completely unable to attach to this process and step into this RESTful service. I can find no useful articles on the Internet on how to do this.

Can anyone provide assistance and tell me how I might debug my service?

1
5 comments

Please share a sample project with the steps to reproduce the problem.

0
Avatar
Permanently deleted user

I'm using this example:

http://www.mkyong.com/webservices/jax-rs/jersey-hello-world-example/

 

The steps to reproduce are:

1. Configure Tomcat in Edit Configurations

2. Set breakpoints within GET method

3. Select Run | Debug

4. RESTful service runs but never steps into breakpoint

0

Works fine here when opening http://localhost:8080/rest/hello/world:

0

I don't think the OP question has been answered.  You have the solution of using a browser and entering in the URL... yes we can all attached the debugger to a browser. The OP asked about attaching the debugger to a RESTfull Client!  So the browser is just fine for a simple GET request. What about a POST that has a lot of input values to be entered in and no form to do it? ...it's an API and as such a UI is not needed so debugging POST is still an issue.

-1

OP question was about not stopping on the breakpoint which we could not reproduce.

-1

Please sign in to leave a comment.