You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a boilerplate express project in TS.
My setup is that I run the project and the build tool chain inside a docker container; the goal being simple replication of dev environments across multiple machines.
The container is managed by the following compose definition:
Note that I am using the working dir as an exact copy of the absolute path on my host machine.
Previously I was mounting to /workspace but I thought that the unmatching paths may be causing the problem; apparently not.
I mount the passwd/shadow so that I can maintain the file ownership.
I have the following vscode launch configuration to attach to the running app instance:
One key unusual thing here is that I am executing make npm run test-brk. This make command translates to a docker-compose exec that runs npm run test-brk within the running container.
The test-brk command in the package.json is defined as:
When I launch the debug config in vscode the tests launch and execute and pass; but the breakpoints are not hit.
`Breakpoint ignored because generated source not found (source map problem?)`
Here is where things get interesting. The above execution runs the npm run test-brk within the container. If I install node on my dev machine and execute npm run test-brk from my host then everything works as expected - the tests run and the breakpoints are hit.
In short - it appears that vscode cannot find the source maps if I run mocha from within the container. But the source maps are found if I run mocha from on the host.
Is there something that I am missing that gets generated within the container that vscode cannot access? even though the workspace folder is mounted?
I would really appreciate any input on this.
Node is version 12.18.1
Source map support 0.5.19
The text was updated successfully, but these errors were encountered:
Hi
I have a boilerplate express project in TS.
My setup is that I run the project and the build tool chain inside a docker container; the goal being simple replication of dev environments across multiple machines.
The container is managed by the following compose definition:
Note that I am using the working dir as an exact copy of the absolute path on my host machine.
Previously I was mounting to /workspace but I thought that the unmatching paths may be causing the problem; apparently not.
I mount the passwd/shadow so that I can maintain the file ownership.
I have the following vscode launch configuration to attach to the running app instance:
This works great. I can attach and hit breakpoints as expected.
However the problem is when I execute mocha tests via the following launch configuration:
One key unusual thing here is that I am executing
make npm run test-brk
. This make command translates to adocker-compose exec
that runsnpm run test-brk
within the running container.The
test-brk
command in the package.json is defined as:When I launch the debug config in vscode the tests launch and execute and pass; but the breakpoints are not hit.
Here is where things get interesting. The above execution runs the
npm run test-brk
within the container. If I install node on my dev machine and executenpm run test-brk
from my host then everything works as expected - the tests run and the breakpoints are hit.In short - it appears that vscode cannot find the source maps if I run mocha from within the container. But the source maps are found if I run mocha from on the host.
Is there something that I am missing that gets generated within the container that vscode cannot access? even though the workspace folder is mounted?
I would really appreciate any input on this.
Node is version 12.18.1
Source map support 0.5.19
The text was updated successfully, but these errors were encountered: