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

Alright. So, I came with the cause of the problem from the server view -which is not a MM fault itself, but a concrete environment difference-. By analyzing the Metamod source code I reached the game/mod detection part which allows the concrete binary selection, and could then analyze the case.

First off, for reference, the loader does this under Linux: https://github.com/alliedmodders/met...oader.cpp#L247.

So I investigated what the contents of the cmdline file for the SRCDS process were. It turns out that under the two aforementioned correct run setup alternatives, the cached arguments stored in the descriptor are split by null terminators (\0s), which MM exactly uses to parse the cached startup arguments and eventually detect the -game one. Example:

Code:
adrian@PC-Adrian:~/Source/metamod$ cat /proc/26584/cmdline 
/home/adrian/.steam/steamcmd/hl2rp_server/srcds_linux-norestart-nowatchdog-gamehl2mp+sv_cheats1+sv_cheats1+maprp_c18_v1
Well, so the problem is that under the affected debugging way (VSCode cppdbg), this file separates the arguments with spaces intead, like:

Code:
adrian@PC-Adrian:~/hl2rp_server$ cat /proc/27479/cmdline
/home/adrian/.steam/steamcmd/hl2rp_server/srcds_linux-norestart -nowatchdog -game hl2mp +sv_cheats 1 +map rp_c18_v1 -debug
I will then try to check how to adapt the launch settings from VScode or change anything anywhere near to solve it, or contact Microsoft in the worst case. Turns out it's a VSCode issue.

EDIT: Upon recently realizing the fault was potentially mine (was filling JSON array-like arguments as a whole string rather than by one argument per item) and fixing the space separators issue, the same SDK2013 misdetection problem is still happening. Currently investigating what else may be wrong.

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