How nodejs CloudFoundry platform applications on remote debugging deployment

On the web tutorials on how to use local debugging nodejs already a lot, tools Chrome developer tools, Visual Studio Code, and nodejs around some small tools.

In reality, we may encounter a good run locally, but the situation after CloudFoundry deployed to the production environment, then you need to debug nodejs direct application in CloudFoundry running of the. This article describes in detail the steps.

First, we have to have a working application nodejs on CloudFoundry. For demonstration purposes, the application as used herein is jerry-demo-server:

 

Using a command
cf ssh -N -T -L 9229: 127.0.0.1 : 9229 jerry-demo-server

 

This command will CloudFoundry applications on remote port 9229 and 9229 on the local port has established a secure SSH tunnel.

Next, we address bar in Chrome Chrome: // the Inspect , you can see the application running on the CloudFoundry already local debugging:

 

Set a breakpoint in the Chrome developer tools, source code:

 

Then enter the url application again in the browser, the breakpoint is triggered, you can begin remote debugging:

 

For more Jerry's original article, please pay attention to the public number "Wang Zixi."

Guess you like

Origin jerrywang-sap.iteye.com/blog/2441550