-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Creating dev container and vscode tasks #449
base: master
Are you sure you want to change the base?
Conversation
Was hoping the automatic docker build would trigger with this PR. I have a hunch that a new build would resolve some current issues being seen simply by pulling a new version of yt-dlp. |
Pretty sure the test failures are related to #448 and not these changes. There isn't anything in here that should affect the tests at all. |
}, | ||
"postCreateCommand": { | ||
"yarn install": "yarn global add freyr", | ||
"install build tools": "sudo apt-get update && sudo apt install cmake -y" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never dealt with devcontainers before, but does it presuppose a debian-based environment? what if apt-get is unavailable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea it is a debian container with some basic dependencies installed. The image details are here:
https://hub.docker.com/_/microsoft-devcontainers-javascript-node?tab=description
.vscode/launch.json
Outdated
"program": "${workspaceFolder}/cli.js", | ||
"args": [ | ||
"spotify:artist:6M2wZ9GZgrQXHCFfjv46we", | ||
"--no-auth" | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's substitute this for npm test spotify.track
or npm test spotify.artist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Replaced the launch configurations with the npm test ...
calls.
The console isn't showing the full output for this, which makes debugging a bit trickier. I think there is a launch setting in vscode that will attach it to stdout so I'm gonna try to find that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added flag to capture stdout in the vscode debug console.
If you want to give the dev container a test run, all you should need to do is run the vscode task Debugging uses the 3 different configurations in 'launch.json' and breakpoints work in the code. |
Creating files that help with local development in visual studio code. These do not affect the build at all, but allow for development inside a container with all necessary dependencies.