-
Notifications
You must be signed in to change notification settings - Fork 2
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
Ought to include a link to setting up VS code #4
Comments
Yes, the Run |
Thanks for that. Now the .vscode is available. No buttons are displayed, nor are there CMake related commands available in the command line. Do I add the configuration launch.json? Sorry, haven't ever used vs before. Not sure how to set it up. |
Now that VSCode is configured and you've installed the Next we need to install the Once that has completed, you will need to reload the VS Code window. This can be done with Now we may configure and build FreeCAD. Press After FreeCAD has been built, you should be able to use the Run and Debug panel to launch FreeCAD within a debugging environment. |
It compiled. Run & Debug started the process. FreeCAD GUI came up, but there seems to be a problem. In VS I get a small window stating there is an error. The terminal process "/bin/zsh '-l', '-c', 'python /Users/me/myApps/FreeCAD/.vscode/scripts/WaitForDebugpy.py'" terminated with exit code: 1. Getting there! Almost. The gui just shows the colored spin wheel, however, the top menu bar is there, but the windows have names, but no contents. Still, quite encouraging. |
OK. That's interesting, I've not encountered that. I suspect that the wrong python interpreter may be called. Did you select the python interpreter associated with the conda environment with You can manually run FreeCAD without the debugging environment via the command line with @Pesc0 have you any suggestions on resolving the debugger issue? |
Yessir i know that issue. Basically freecad launches, then stops to wait for the debugger to attach. At the same time the debugger is waiting (up to 30 sec) for freecad to launch before attaching. Those 30 seconds have run out and everything hangs. Solution: close fc, close the debuggers, make sure everything is stopped then try again, if it still doesnt work increase the timeout (located in .vscode/scripts/waitfordebugpy) Weird, I thought i had suppressed the error message Also note that jacob's guide is not up to date with the latest changes, please take a look at FreeCAD/DevelopersHandbook#52 |
I'm encountering a different issue. On macOS at least, the call to |
Yeah it's quite a hack, I couldn't come up with anything better. The thing is you cant probe debugpy at all, yet you still need some kind of sync mechanism. perhaps writing to a tempfile would be a better solution? let's say we're working with the tempfile .vscode/.debug-tempfile
|
Yes, I did. It also happened to be the recommended interpreter. Choices were the freecad:conda python, the homebrew python, or the system python.
I picked the first item in the list python. |
@Pesc0 I think the tempfile approach is worth trying. It is less likely to have conflicts (I have port 6000 in service elsewhere). @bdlabitt You may be encountering the issue I did, which is that the behavior of some sockets differ on the macOS platform than on Linux. A quick hack to get FreeCAD to launch would be to edit the file
and
This will make a new item in the |
FYI at least on my M3 Max, when FreeCAD hangs, it requires a Force Quit, the first level Quit does nothing. F5 for the stop debugger command? I will try increasing the timeout to 120, just to see if it works. Nothing ventured, nothing gained... |
Not familiar with editing launch.json, is there a way to comment things out? Generally don't like deleting things until everything is sorted out ;). Deleting stuff (and forgetting exactly what it was) has been problematic in the past for me. You think you will remember, but often you don't remember everything! |
For the moment, simply changing the timeout from 30 to 120 seconds in the file WaitForDebugpy.py has allowed FreeCAD to start in debug mode. I'd bet it would work at 31 seconds, as there wasn't much of a delay at all. This copy of compiled FreeCAD seems to be functional at this point, at least to the point of opening a few of my files. During Cmake, I noticed it said that it couldn't find blas, is this a problem? Can you tell me why on earth FreeCAD is looking into my TimeMachine drive? Isn't that snooping where it shouldn't be looking? Seems highly suspicious for an application to do something like that?
|
That's great news!
No.
The open files dialog does it's own thing, perhaps that is in your |
What's the best way to do this? Download direct from MS? Homebrew? As a new user, and new to macos, I don't have these tools on my MacBookPro M3 Max.
Might be useful to have a link which shows a set up from scratch. Most won't have to follow the link, but some, like myself, would find it quite useful.
FWIW, I'm just trying to follow your instructions on building FreeCAD. It may seem obvious to you, but having vs installed (as a prerequisite) wasn't so obvious to me. When I got "zsh: command not found: code", then I realized I didn't have vs, and it was needed. Sorry to be uninformed, but we all have to start from somewhere...
I have built FreeCAD from source using Linux, but doing it on Macos is an entirely new experience for me.
The text was updated successfully, but these errors were encountered: