-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Check in VS Code debug configurations #1769
Check in VS Code debug configurations #1769
Conversation
Links to documentation supporting these rule changes: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-run as a reminder!! One reason that this might be done as a general practice is to keep secrets out of the repo. If you're using environment variables to store DB passwords, API keys, and so on, you can configure those for your dev hosting environment under Project Properties -> Debug, as key-value pairs. That configuration gets persisted locally in the project's launchSettings.json, so by keeping that file out of commits you avoid leaking privileged information into your repo. Note though, that the current best practice is not to store secrets in this way at all during development, but to use the Secrets Manager instead. found this extra Information in stack overflow. |
@msafi so with this, doing F5 under visual studio code just work? |
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.
Checked and for me it works. I can now cleanly start the app via the Debug menu and it comes up without warnings – this was different a while back, but I don't know if it's due to these changes that the warnings disappeared.
However, it works and once the changes @msafi and @Eskyee talked about are incorporated, this should help people getting started in VS Code more easily! Thanks 🍰
If they have the C# extension for VS Code installed, then yes, it should just work. VS Code will prompt the user to install the C# extension when they open a {
"recommendations": [
"ms-dotnettools.csharp"
]
} |
@msafi feel free to add @dennisreimann warnings are gone because of #1769 (comment) |
just tested this latest pull request in visual studio code, and the builds are fine no problems detected, |
@msafi once you finished here, could you test Visual Studio, and BTCPay Server, as a default, etc etc, because we had a few problems, with launch settings json, & developing easy on a Mac!! cheers their are no problems developing with Rider IDE on a Mac. it checks out ok. |
@Eskyee I just tested the configurations in VS Code and I was able to start the app and set a breakpoint. It seems to work. I think this PR is ready to merge. |
Cheers 🍻 |
When setting up BTCPay on VS Code IDE, VS Code will ask
When you click "Yes", you'll be presented with two options
If you select
BTCPayServer.Tests
, the C# extension will generate broken debug configurations. So pressing F5 will not work. At this point, to fix the issue, you have to delete.vscode/launch.json
and.vscode/tasks.json
then restart VS Code. It will prompt you again to add the missing assets and this time you can selectBTCPayServer
to get things to work.To avoid this situation altogether, this PR checks-in the correct
.vscode/launch.json
and.vscode/tasks.json
. With that, VS Code users would not be prompted to add missing assets. Pressing F5 should just work.But I think there's some cruft in those files (see comments on the code below)