-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docker-TypeScript] Using ts-node and nodemon doesn't properly #187
Comments
Setting breakpoints and stepping through code works fine in Google Chrome. I pick the |
@auchenberg @umarov {
"type": "node",
"request": "attach",
"name": "Attach to Docker",
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}"
} FROM node:11.8.0
# This needs to be the same path as on your computer
WORKDIR /Users/cschroeter/my-app
COPY package.json yarn.lock ./
RUN yarn && yarn cache clean
COPY . .
EXPOSE 3000 9229
CMD yarn start version: '3.7'
services:
app:
build: .
command: yarn start:debug
volumes:
- './src:/Users/cschroeter/my-app/src'
ports:
- '3000:3000'
- '9229:9229'
|
I have the same issue. You can also take nodemon out of the equation to simplify |
Yes this. Matching the local and remote roots and changing the workdir in docker fixed it but that is not a good fix. not portable at all. |
The
|
We no longer have a Docker-TypeScript recipe as it has been supplanted by Remote-Containers functionality. |
I have an example project here.
My nodemon command with ts-node looks like this inside
nodemon-debug.json
:The debug command that gets executed by docker is this:
Dockerfile looks like this:
launch.json looks like this:
VS Code attaches, but when I put a breakpoint, it looks like this:
I tried to follow the TypeScript Docker guide as closely as possible. My setup is a bit different. I was wondering if it would be possible to add an example that uses nodemon and ts-node the way I am using it. Or tips on getting it to work. I could make a PR to add directions if I can get this to work.
The nodemon script I use it generated from Nest.js. I change the inspect from
--inspect-brk
to--inspect=0.0.0.0:9229
.The text was updated successfully, but these errors were encountered: