-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SketchUp 2021 does not run from vscode via run task #7
Comments
Can you provide the output of these two commands please?
Also, what version of macOS are you using? |
Certainly.
macOS Catalina, Version 10.15.7
|
That will only start SketchUp with the debugger listening. You also have to attach the debugger from the Run (Formerly Debug) tab in VSCode with the "Listen for rdebug" selected. |
What does your |
hm... I was trying to use |
Ok, got my dev environment corrected. I also observe that using the tasks from However, if I start from the terminal, |
For the sake of testing I also tried to launch another SketchUp version, this time one I didn't have the debugger installed to: This indicates that skippy is at least starting, but it the fails to launch SketchUp. I don't understand why though, since executing the same command directly in the terminal works fine while via VSCode it fails. Maybe some kind of permission change in Catalina? |
While we figure this out, a workaround is to use a task that starts SU directly: {
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "open SU",
"type": "shell",
"command": "open",
"args": [
"-a",
"/Applications/SketchUp 2021/SketchUp.app",
"--args",
"-rdebug",
"ide port=7000",
],
"runOptions": {
"reevaluateOnRerun": false
},
"problemMatcher": [],
"isBackground": false,
},
{
"label": "Launch SketchUp in Ruby Debug mode",
"type": "shell",
"command": "skippy",
"args": [
"sketchup:debug",
"${input:sketchupVersion}"
],
"runOptions": {
"reevaluateOnRerun": false
},
"problemMatcher": [],
"isBackground": false,
}
],
"inputs": [
{
"id": "sketchupVersion",
"type": "pickString",
"description": "SketchUp Version",
"options": [
"2021",
"2020",
"2019",
"2018",
"2017"
],
"default": "2021"
}
]
} |
Yep -- that seems to start sketchup. I've not gotten breakpoints to work yet, but I can now start sketchup when I run the task. I admit, this is my first time trying to develop in Sketchup via Visual Code, so maybe I'm missing something very basic. I was assuming it would be enough for me to set a breakpoint, and run the method, either from the extension drop-down, or from the ruby console, but it doesn't break on the breakpoints that I've set. |
Because the debugging is a remote sessions (since it's running inside SU and not VSCode) we first need to launch SU with the debug command line args to enable the debugger. Then once SU has started you need to attach the debugger (From the Run) tab in VSCode). Then your breakpoints should trigger when you execute the code with the breakpoint. Did you attach the debugger after launching SU in your testing? |
I suspect at this point I'm just doing something wrong because I'm new to this environment. After I run the task, I do see the following in the
And SU opens, and I can load a model, etc. In VSCode, I do see the
When looking at my process list:
I see that it appears SketchUp was run with
Implying that the Sketchup is ignoring the -rdebug command? or something... so, yeah... still no debugging for me! |
Any firewall or anything that could be blocking the ports? |
well... unless I'm getting the commands wrong, I was looking for what processes have an open TCP port 7000... and came up with nothing. Ie: no process is listening on that port. A firewall might prevent a connection from getting made to that port, but it would not prevent a process from starting and listening on that port, right? I am running this on a corporate Mac, so, there could be something going on from a security perspective, but again -- From the run info I linked above, I'm seeing 2 processes when sketchup starts. The first one: PID: 56181 looks like it's the entry-point / shell that subsequently forks a new process with PID: 56184. I might have expected PID 56181 to pass some argument down to 56184 with the debugging port number, but I'm speculating... I looked at Is there more information I can look up about |
We have the source code here. You could try building it and set a break point to see what happens when it initializes. I'm more familiar with Windows, so I'm not sure exactly what to suggest. I don't see anything in your setup that raises any flags. On Windows I would have suggested using ProcessExplorer to inspect whether the Ruby Debugger DLL is in fact loaded. Any are familiar with similar tool for mac? |
I'm running into a vscode / sketchup issue.
If I try to use
run task...
from vscode sketchup does not start at all.If I run
skippy sketchup:debug 2021
on the command line, sketchup 2021 does open (but breakpoints do not work).This public GitHub repo is based on your
VSCode Project for SketchUp Extension
project -- I have done very little to it yet.I have installed the latest SketchUp Ruby API Debugger on my Mac.
The text was updated successfully, but these errors were encountered: