Rest Client question

I'm debugging a node.js application using PHPStorm.  Maybe I should be using Webstorm, but I've been told they are equivalent.

I'm using the Rest Client.  When I start up the app using the Debug button, I see the app under "Debugger" button.

Then I run my Rest request by clicking the 'debug' in the rest client interface.

Now, in addition to my node.js app (run.js) I see another tab, 'localhost'

The app stops on breakpoints, it seems to go to run.js.  If I find a problem, I debug the app again, restart the app, but then I see multiple tabs with localhost.  When I close them Phpstorm asks me if I want to stop the process.  

All, this is very confusing.  I sometime will end up with 10 tabs or more, I have to go through each one.  I don't see what advantage this gives me, I only want to run one environment at a time.

 

Another question, I'm not sure if this is related.  Rest request always seems to run twice.  I look at the debugger, and I see it going twice, sometimes with a delay back to the original rest request.  How can I fix this?

 

3 comments
Comment actions Permalink

Most likely you're starting the add debug without stopping current Debug session. You would need to switch to run.js tab and click Stop button.

As for REST request being sent twice - looks like we don't have this reported. Can you share more details on this?

0
Comment actions Permalink

I start the app by clicking debug in the top bar:

 

it starts up, and then I see the debug area below.

 

If there is a problem, I usually click the 'Rerun button'

I start the "Test Restful

 

After that, I see this:

 

I have been pressing the green ladybug, which says 'Submit request in debug mode'.  Are you saying I shoud be

pressing the GREEN ARROW which the mouseover says "Submit Request"?

 

 

0
Comment actions Permalink

Could you please try to skip first steps (Start an app by clicking debug button) and go straight for Test RESTful > click "Run request in debug mode" (ladybug button).

 

This should activate a single debug session you would further use.

0

Please sign in to leave a comment.