Add instructions for debugging with VS Code#405
Conversation
|
Actually, I'd like to try tomorrow with one other debug extension. If I can get it to work, then I can remove the section about the manifest issue. |
|
I think the section on the manifest issue is exactly what needs to be there. If I had found that when I was trying to get it working it would have saved me a lot of time. Documentation should be written in the manner of "explain it to me like I'm 5 years old". A link to a full |
|
This morning I tried two other debugger extensions: Lua Debug (actboy168, has the most downloads) and Lua (Tencent, second most downloads). I couldn't get the first one working; it seems to use a different model for remote debugging that didn't play nicely with Finale. The second one is easy to use -- it even installs VS Code commands to download the debugger file and add the debugger code to your script! The downsides are that it doesn't seem to have a way to redirect print output to VS Code (although it does have a On the whole, I think I'm going to stick with my initial choice of debugger, even though it's a little more work to set it up. If you disagree, I can rewrite my instructions for the Tencent debugger. Otherwise, this PR is ready for review and merging. |
|
This looks great. Could you add a comment about print redirect into the debugger? If it works out of the box, then a simple comment that no additional action is needed for it. I'm just trying to cover all the bases that the docs for ZeroBrane cover. |
|
I've got that -- look at my point 5. Does it make sense to include mobdebug and vscode-debuggee in the repo, in a subfolder of src? That's one less step for everyone. |
|
Thanks for pointing that out. Merging now. It will be interesting to see how the diff renders on the site. It won't be as nice as github but hopefully will be clear enough. The only way to find out is merge and see. |
|
@rpatters1 You may have seen, but this seems to have broken the page on the site. The rest of the site is fine, but if you click on this page, it's blank -- and then all other pages are blank. View source shows a hydrate error:
I'm not sure what framework is running your site, but it looks like it's trying to interpret the text in launch.json. |
|
I tried removing the json but that didn't fix it. I have reverted #405 for now, until we hear from @Nick-Mazuk about how to proceed. |
|
Thanks again @asherber for posting this. I'm definitely going to get this working on my system when I get a minute. |
|
P.S. I also like the idea of including modebug and vscode-debuggee in the repo. I would put them in a separate folder from src. We'll also need to include their license files from their source repos, which means each prolly needs to be in a separate sub-folder. Something like: Lunajson is included in src because it is directly required by a production script. (The script that updates settings from a SMuFL json file.) |
|
Svelte (which powers the website) treats curly braces with something in between in a special way (ie |
|
Bummer. So how about I take that JSON out of there and instead link to a gist? I'm guessing I can't just link to a JSON file elsewhere on this site, because svelte will have the same issues with the braces. |
|
Actually, if I'm reading https://svelte.dev/repl/2290fc67e7c0479881a266abb34e0f4d?version=3.20.1 and https://stackoverflow.com/a/61089468/226781 correctly, I should be able to use { and } in the Markdown file. Does that sound right? I don't know anything about Svelte. What's interesting is that Svelte didn't complain about the braces in the diff file snippet. |
|
@ThistleSifter created a PR in the docs site that should fix it by escaping the curly braces: finale-lua/jw-lua-scripts-docs#23 I'm still looking at things in more detail to know for sure, but it seems like that PR fixes things. FYI, sorry for just now seeing this. My job had layoffs this week and it was pandemonium trying to figure out who all was laid off and how to move forward without them. |
|
Well that PR removes the crashing, but it doesn't seem to format things correctly… https://jw-lua-scripts-docs-axl5x3hnn-finale-lua.vercel.app/docs/rgp-lua/development-environment Looking into this some more. |
|
Ok, I have a fix. https://jw-lua-scripts-docs-aaxu5tztx-finale-lua.vercel.app/docs/rgp-lua/development-environment For those curious, the issue was the In the website builder, the Markdown files for all the docs are converted to a JS template literal (a type of string). The The fix was just to escape the I deployed the fix to the site, so you should be able to update the documentation to include the original code snippets. |
|
Thanks for that. I did go digging but I must've missed where they were converted to template literals. |
|
That's understandable. The actual implementation is kind of crude. At some point I should redo the docs generation as more people are contributing now. And I'm kind of a single point of failure for that. Anyways, probably the easiest thing to do is to see the "after" from the markdown processing. The Markdown file goes into a template literal, then that goes into a Markdown component that parses the template literal then converts it to HTML. The build system this 2-year-old version of Svelte uses doesn't support importing the Markdown files directly, which is why it's converted to a template literal. |
|
Ahhh... I was looking at this on my phone and I must've blinked or something and missed the backticks around Let me know if there's anything I can do to help out with updating the build process. |



Instead of including the contents of
launch.json, should the file live somewhere else (where?) and just be linked to here? It would make the docs shorter and less intimidating, especially with the need to include instructions to fix the manifest bug.