LuaLS / LuaLS.github.io

Statically generated website for LuaLS using Astro.
https://luals.github.io/
6 stars 12 forks source link

Suggested improvement for Wiki page "developing: Attach Debugger" #16

Closed SimplSam closed 10 months ago

SimplSam commented 10 months ago

Attach Debugger

I think there are a few things that could benefit from greater clarity in order to avoid unnecessary confusion & frustration when trying to get the debugger to work. I spent a bit of time going round in circles, due to the following misunderstandings. A lot of these may seem obvious, but when it isn't working, one can end-up trying to fix things in the wrong place/s.

  1. Install actboy168.lua-debug: Your doc links to actboy168.lua-debug, which in-turn has detailed instructions for building & installing, which allows for some confusion. I think it should be made clear to install the extension via VSCode only - with no need for any other installation steps.

  2. Debug Host: is referred to as the language server within: ... /.vscode/extensions, it should really indicate that it should be the server folder within the language server: i.e. ... /.vscode/extensions/<sumneko.lua-***>/server

  3. Copy .vscode/launch.json into Debug Host: Similarly it should be made clear that launch.json should be placed in a .vscode folder inside the server folder

  4. Open the Run and Debug sidepanel ... : This instruction follows one relating to the Debug Target, and as such implies that it also relates to the Target, whereas it relates to the Debug Host. So that should be made clear.

  5. Finally - I found that I needed to Restart the Debug Target after the the Debug Host was up and running / debugging - not before.

carsakiller commented 10 months ago

The development page content is pretty old as far as I know. I have got the debugger working before, but I have also struggled to get it to work. Unfortunately, lua-debug doesn't really have any documentation, but it is what is used.

  1. The article links to the VS Code marketplace extension, asking that users install it. The extension README contains build instructions, but I thought it was pretty clear that the user just needs to press the green "Install" button and not follow the below instructions for building from source. Do you have any suggestions for how it could be made clearer?

The article could definitely be clearer, I'll add these other suggestions now.

SimplSam commented 10 months ago

Great - it is much clearer now. W.R.T. The lua-debug install. You could just add what you have stated. i.e.: 'Just need to press the green "Install" button and not follow any instructions below it -- or install the extension via VSCode itself.'

I normally install everything via VSCode, so was unfamiliar with the Marketplace website. Possibly/Probably others will be more familiar with it.

carsakiller commented 10 months ago

I have simplified the wording to hopefully make it clearer how the debugger should be installed.