moleculerjs-boilerplate
moleculerjs-boilerplate copied to clipboard
Debugger?
Hi,
How to add debugger / inspector for this boilerplate?
Thank in advance.
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.
Hi @venkatrjv!
You can use morgan to monitor traffic in command-line. And if you want to separate your debugging logs I can recommend debug.
You will need to add these in here.
Nonetheless, we have no implicitly dedicated tool for debugging.
👨💻 Happy Coding!
Hi
Hi @venkatrjv!
You can use morgan to monitor traffic in command-line. And if you want to separate your debugging logs I can recommend debug.
You will need to add these in here.
Nonetheless, we have no implicitly dedicated tool for debugging.
👨💻 Happy Coding!
Is there any possible way to add node --inspect ?
As because moleculer js supports it.. Link -> https://moleculer.services/docs/0.13/faq.html#How-can-I-start-services-with-Moleculer-Runner-in-debug-mode
@venkatrjv debugger works great in webstorm
Here is my current config
Launch Swagger with Debugger
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Swagger - TS Moleculer" type="NodeJSConfigurationType" application-parameters="--hot --repl --config moleculer.config.ts services/**/*.service.ts " node-parameters="--require ts-node/register -r tsconfig-paths/register" path-to-js-file="node_modules/moleculer/bin/moleculer-runner.js" working-dir="$PROJECT_DIR$">
<EXTENSION ID="com.jetbrains.nodejs.run.NodeJSStartBrowserRunConfigurationExtension">
<browser name="98ca6316-2f89-46d9-a9e5-fa9e2b0625b3" start="true" with-js-debugger="true" url="http://localhost:3001" />
</EXTENSION>
<method v="2" />
</configuration>
</component>
Run Jest with Debugger
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Test Backend - TS Moleculer" type="NodeJSConfigurationType" application-parameters="--runInBand" path-to-js-file="node_modules/jest-cli/bin/jest.js" working-dir="$PROJECT_DIR$">
<method v="2" />
</configuration>
</component>
@venkatrjv debugger works great in webstorm
Here is my current config
Launch Swagger with Debugger
<component name="ProjectRunConfigurationManager"> <configuration default="false" name="Swagger - TS Moleculer" type="NodeJSConfigurationType" application-parameters="--hot --repl --config moleculer.config.ts services/**/*.service.ts " node-parameters="--require ts-node/register -r tsconfig-paths/register" path-to-js-file="node_modules/moleculer/bin/moleculer-runner.js" working-dir="$PROJECT_DIR$"> <EXTENSION ID="com.jetbrains.nodejs.run.NodeJSStartBrowserRunConfigurationExtension"> <browser name="98ca6316-2f89-46d9-a9e5-fa9e2b0625b3" start="true" with-js-debugger="true" url="http://localhost:3001" /> </EXTENSION> <method v="2" /> </configuration> </component>
Run Jest with Debugger
<component name="ProjectRunConfigurationManager"> <configuration default="false" name="Test Backend - TS Moleculer" type="NodeJSConfigurationType" application-parameters="--runInBand" path-to-js-file="node_modules/jest-cli/bin/jest.js" working-dir="$PROJECT_DIR$"> <method v="2" /> </configuration> </component>
Hey This is for pankod moleculer js to run the code. Looks like its not
This is a webstorm debugger configuration to run the pankod moleculer boilerplate
This is a webstorm debugger configuration to run the pankod moleculer boilerplate
Can u provide any reference so that I can add this to my code..
Use webstorm and have .idea in your project root, whether you decide to add it to version control is up to you.
cd .idea
mkdir -p runConfigurations
cd runConfigurations
touch Test_Backend___TS_Moleculer.xml
touch Swagger___TS_Moleculer.xml
copy the run configurations into those files and you should be good to go.
You can also setup the run configurations through webstorms UI, using the configuration params in the
If webstorm run configurations are new to you I recommend watching a couple youtube videos to familiarize yourself with the basics.
Once you have them setup you can run them via the webstorm debugger.
For the swagger configuration you need to launch swagger via the webstorm npm launcher after starting the debugger so that it binds to the correct debug port that is dynamically assigned.