slackhq / vscode-hack

Hack language & HHVM debugger support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=pranayagarwal.vscode-hack
MIT License
73 stars 36 forks source link

Visual code debugger adapter immediately dies when used with vscode-hack debugger extension #125

Open ajayvohra2005 opened 3 years ago

ajayvohra2005 commented 3 years ago

I am using the vscode-hack extension on visual code studio on macOS Big Sur. My settings.json includes following launch configuration:

"configurations": [
{
"name": "HHVM: Run Script",
"type": "hhvm",
"request": "launch",
"script": "${file}",
"hhvmPath": "/usr/local/bin/hhvm",
"hhvmArgs": ["--mode", "vsdebug", "--vsDebugPort", 8999],
"cwd":"${workspaceFolder}"
}
]

When I try to debug a Hack script in Visual code debugger, Visual code debugger adapter launches and immediately dies. I have verified launching hhvm with the same args from command line, and it works fine. I am following the instructions here https://github.com/slackhq/vscode-hack/blob/master/docs/debugging.md.

vscode-hack extension version: 2.10.0

Visual Code version: Version: 1.60.0 Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff OS: Darwin x64 20.6.0

Os version: macOS Big Sur 11.5.2

ajayvohra2005 commented 3 years ago

After trying around different combinations of configurations and vscode-hack extension, the following combination of the vscode-hack version and configuration works, so it appears this issue may have started with vscode-hack extension version 2.8.0.

vscode-hack version: 2.7.1

configuration:

{
                "name": "HHVM: Run Script",
                "type": "hhvm",
                "request": "launch",
                "script": "${file}"
},