View Single Post
AdRiAnIlloO
Member
Join Date: Jul 2015
Location: Spain
Old 08-17-2021 , 17:56   Re: Extension dev issue - VSCode debug
Reply With Quote #3

Alright, here's the final full solution. When configuring your .vscode/launch.json (for debugging), don't set the SRCDS arguments like this:

Code:
"args": [
  "-game hl2mp +sv_cheats 1 +map dm_lockdown"
]
because this will cause whole "human-perceptible" arguments to be treated as a single argument to Linux, due to VSCode string quoting mechanism on launch around arguments.

Instead, wrap at least each of the two game argument tokens into a single array element:

Code:
"args": [
  "-game",
  "hl2mp",
  "+sv_cheats 1 +map dm_lockdown"
]
This way Metamod core will be able to properly detect the game (in this case HL2DM) since cmdline file will have a \0 separator between both tokens -as MM requires-, while the remaining tokens, getting separated by a space in the cmdline file (which server parses fine), shouldn't be any problem for MM as it may not use them.

Hope this helps anyone.

Last edited by AdRiAnIlloO; 08-17-2021 at 18:06.
AdRiAnIlloO is offline