Closed usrsname123 closed 2 years ago
This was added in v2.6.1, but to be fair I didn't document it in the wiki.
You can configure availableAPIs
in your settings like so:
"sourcepawn.availableAPIs": [
{
"name": "Latest",
"SMHomePath": "D:\\Source\\sourcemod\\scripting\\include",
"compilerPath": "D:\\Source\\sourcemod\\scripting\\spcomp64.exe"
},
{
"name": "1.10",
"SMHomePath": "D:\\Source\\sourcemod\\scripting\\1.10\\include",
"compilerPath": "D:\\Source\\sourcemod\\scripting\\1.10\\spcomp.exe"
},
{
"name": "1.6",
"SMHomePath": "D:\\Source\\sourcemod\\scripting\\1.6\\include",
"compilerPath": "D:\\Source\\sourcemod\\scripting\\1.6\\spcomp.exe"
}
]
And to switch between them, use the vscode command "Change SM API" to switch between them.
That should adress what you are looking for.
Oh it really works. Could you make a dropdown next to the compile button? Otherwise, I can compile manually faster than poke a lot to change the configuration :)
Sadly, VSCode does not support adding dropdowns in the UI...
Feature description
What do you want to see added to the extension? I have 2 versions of the compiler: with debugging and without. I would like to be able to add multiple compilers. Let's say there would be a drop-down list with the name of the configuration, and in the settings you could specify the path to includes and spcomp (for example, the configuration for sourcepawn 1.10 and 1.9). It would also be nice to add launch options for each of them. Perhaps they can be added when specifying spcomp, but I have not checked this yet.
How would it help you? This will help me a lot to speed up the debugging process for each version of sourcemod.
How often would you use this feature? I always suffer with this 👀