-
Notifications
You must be signed in to change notification settings - Fork 7
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
Debugging in Mac m2 Pro does not work #38
Comments
I searched for a lot of information but couldn't solve this problem. What should I do? |
I am not sure what cs-script version you are running. The plugin that is currently distributed is compiled against .NET but not .NET Framework. Thus it cannot be executed nor debugged unless you have .NET 8.0 installed. If you do, then you don't need mono at all. You just have VSCode .NET tools installed and it's all you need |
The. net version is 8.0 cs script, which is the latest version |
OK, then I do not know who the mono compiler is in the picture. cs-script is executed under the hood with the And for debugging VSCode is using the .NET tools plugin but not the Mono plugin. This is the primary problem. The secondary problem is that I made a mistake in my answer. The VSCode CS-Script plugin depends on .NET 7 not .NET 8. I will prioritize this work, but it will not help you until you solve the Mono problem. |
May I ask how to install CS script on Mac? I tried several methods, but none of them worked |
Install .NET SDK 8. In your case it will be either manual approach or as a .net tool. I suggest you do the second:
Now you can execute cs-script as
I would recommend creating an alias:
After that you can create the script
and execute it
|
CS script has been installed and still cannot be used I recorded a video, you can take a look Operating system Mac m2 Vscode version 1.90.2 CS script latest v 2024-06-20.22.52.13.moversion |
Great progress. The only thing that is not happening for you is debugging. I have checked and in So please check if it helps. Remember, you must ensure you have no workspace/folder open in VSCode. Only a single cs file. The whole debugging is not a rocket science. Plugin simply executes I captured this file from a sample C# project I created with VSCode. Maybe this let launchConfig = {
name: ".NET Core Launch (console)",
type: "coreclr",
request: "launch",
program: "dotnet",
args: [settings.cscs, "-d", extra_args().replace("-co:/debug:pdbonly", ""), vsc_config.get("cs-script.extra_args"), "", "-l", "-ac:2", editor.document.fileName],
cwd: path.dirname(editor.document.fileName),
console: "internalConsole",
stopAtEntry: false
} |
I found that there must be no open workspace/folder in VSCode. Is it normal for only one CS file to be debugged? |
Yes, it is normal. In fact, it is the only right way for the extension to operate. Otherwise, if you start debugging the script while VSCode has the workspace it is not clear what is going to be debugged an open document or an open folder. This is the reason I have asked you to open VSCode without any folder loaded. I even used work empty in bold. :) |
Sure, thank you very much. It's already working fine now. This is a great feature, and I'm very grateful for your help. |
The vscode plugin CS Script Mono Debug C # has been installed
Mono has also been installed
The program can run normally, but clicking the debug button does not respondIs it a problem with my local environment? Can you provide some guidance? Thank you very much
The text was updated successfully, but these errors were encountered: