Replies: 3 comments 2 replies
-
Terrific news, Maximilian. I will verify it right away and publish it
Thank you - many developers will be happy
Sent from my iPadOn Dec 7, 2022, at 4:52 AM,
…---
Maximilian Raschle ***@***.***> wrote:
Hello!
I've made some effort to finally debug the web and api side and it may be a good addition to the RADC.
Here is my current approach:
Update the launch.json
{ "version": "0.3.0", "configurations": [ { "name": "Launch Chrome", "type": "chrome", "request": "launch", "url": "http://localhost:8910", "webRoot": "${workspaceRoot}/web/src" }, { "name": "Launch Firefox", "type": "firefox", "request": "launch", "url": "http://localhost:8910", "webRoot": "${workspaceRoot}/web/src" }, { "name": "Attach API debugger", "type": "node", "port": 18911, // you can change this port, see https://redwoodjs.com/docs/project-configuration-dev-test-build#debugger-configuration "request": "attach", "skipFiles": ["<node_internals>/**"], "localRoot": ***@***.***/api-server/dist", "remoteRoot": ***@***.***/api-server/dist", "sourceMaps": true, "restart": true } ] }
set the vscode debug.javascript.autoAttachFilter to "smart"
"debug.javascript.autoAttachFilter": "smart",
restart vscode
run "yarn rw dev" in the integrated terminal"
(optional) disable the browser open in redwood.toml to avoid confusion
Debugging is only possible through the launched browsers with devtools
run the debug configuration "launch chrome"
Happy Debugging 🥳
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thank you for your response! For your information. for instance with yarn rw storybook. sadly this doesn't work with vscode at the moment. |
Beta Was this translation helpful? Give feedback.
-
This is likely true, but you need to be aware that this description is just a part of what I am planning to write. Here is a rough sketch of my plan for the next few days:
With these in place, we will see how one can use Chrome debugger or VSCode debugger in the task of front and RW app debugging. A lot more coming next, the above plan (1, 2, and 3) should give us a common understanding of what we are dealing with here. |
Beta Was this translation helpful? Give feedback.
-
Hello!
I've made some effort to finally debug the web and api side in vscode and it may be a good addition to the RADC.
Here is my current approach:
{ "version": "0.3.0", "configurations": [ { "name": "Launch Chrome", "type": "chrome", "request": "launch", "url": "http://localhost:8910", "webRoot": "${workspaceRoot}/web/src" }, { "name": "Launch Firefox", "type": "firefox", "request": "launch", "url": "http://localhost:8910", "webRoot": "${workspaceRoot}/web/src" }, { "name": "Attach API debugger", "type": "node", "port": 18911, // you can change this port, see https://redwoodjs.com/docs/project-configuration-dev-test-build#debugger-configuration "request": "attach", "skipFiles": ["<node_internals>/**"], "localRoot": "${workspaceFolder}/node_modules/@redwoodjs/api-server/dist", "remoteRoot": "${workspaceFolder}/node_modules/@redwoodjs/api-server/dist", "sourceMaps": true, "restart": true } ] }
"debug.javascript.autoAttachFilter": "smart",
Beta Was this translation helpful? Give feedback.
All reactions