-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for vscode #160
base: master
Are you sure you want to change the base?
Conversation
This adds some concerns if we're implementing it this way
I think that adding a new VSCode specific templates for Standard/Sdk would be better - we could move all of the dynamic variables stored in MSBuild to Also, as a comment, I think it would be better to file a bug report to VSCode/ C# Dev Kit extension for the lack of |
https://code.visualstudio.com/docs/csharp/debugger-settings#_launchsettingsjson-support Seems like vscode originally planned it to be this way, i agree that mixing both configs isn't the best of ideas, that would reduce the complexity of templates, however, that will make maintaining the templates more difficult.
I don't really see what your concern is about here, this would mostly be an issue if the
This would require the use of an msbuild task just for that purpose, which is somewhat confusing to use, even with the documentation provided. EDIT: i may have misunderstood what you meant for that last part. |
I've added my own interpretation of VSCode, but as you said, MSBuild code is a mess, especially the way to read JSON without any JSON dependency |
you should be able to make use of System.Text.Json just for this task, it shouldn't pose any issues, or worst case scenario, you can make use of the game's newtonsoft dependency. |
Surprisingly, Reusage of Newtonsoft could work when the game folder is available, and reference assemblies are not set, but there are other issues |
Premises
vscode cannot make use of the
Properties/launchSettings.json
file as it uses an unsupportedcommandName
, onlyproject
is supported in vscode.What is this PR for
This PR aim to add launch & debug support of modules in vscode.
Necessary files
To achieve this, 3 files are necessary:
Only a single of those files,
launch.json
, requires the use of variables to make a newly created module, work properly.those variables are stored in the
settings.json
files and is used by vscode to feed the appropriate values.the 2 variables that are required are:
Unfortunately, the addition of 3 template symbols, including a single parameter are required.
Template symbols
-c or --code will need to be used if the user intend to use vscode as their IDE.
Generated type symbols are used to replace the placeholders present within
settings.json
initially.If the
gameWindows
parameter is true,gameBinariesFolder
's value is theWin64_Shipping_Client
folder, if not then,If the
gameWindowsStore
parameter is true ,gameBinariesFolder
's value is theGaming.Desktop.x64_Shipping
folder.a separate symbol to
moduleName
that control its presence, in the case that it is not,sourceName
will be used (thename
symbol represent that value)Folder exclusion
In the case that the user specify the use of vscode, the
Properties
folder will be excluded from the template.The opposite, will be true if the user does not specify any values or false,
.vscode
will be excluded.What could be done on top of what is currently provided
If necessary, i can add the publish and watch tasks back to
tasks.json