Skip to content
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

Latest Update from the submitted PRs #36

Open
GeorgeS2019 opened this issue Aug 31, 2022 · 33 comments
Open

Latest Update from the submitted PRs #36

GeorgeS2019 opened this issue Aug 31, 2022 · 33 comments
Assignees
Labels
bug Something isn't working

Comments

@GeorgeS2019
Copy link

GeorgeS2019 commented Aug 31, 2022

There have been THREE PRs recently

Please provide the following information

  • Are these PRs work for VS2022 or Just VS2019. Suggestion: please include VS2022
  • What environment have people tested these PRs. Godot3 or Godot4 and what version. What is your experience?

I am interested to know if these PRs work with Godot4 with dotnet6 merged

@GeorgeS2019 GeorgeS2019 added the bug Something isn't working label Aug 31, 2022
@Intrivus
Copy link
Contributor

It works bro it is locked to 2022....

@Intrivus
Copy link
Contributor

I compiled the plugin xd

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Aug 31, 2022

I saw under VS2019 menu extension. The submenu..GoDot and configure...but it crashes..

Share screenshots..please

@Intrivus
Copy link
Contributor

i can send u the compiled plugin? and i fixed the GoDot bug replaced with Godot

@GeorgeS2019
Copy link
Author

Yes..please share ..do u use Google drive to share

@Intrivus
Copy link
Contributor

image
The extension: https://www.mediafire.com/file/24ch2tz6u6embbq/GodotAddinVS.vsix/file

@Intrivus
Copy link
Contributor

Btw u should help me by telling the owner of the PR to make some changes i mention in the PR of his/her

@Intrivus
Copy link
Contributor

who are you

@Intrivus
Copy link
Contributor

If this works, i will promote through godot discord

Dont promote me, promote the guy who make these changes

@Intrivus
Copy link
Contributor

@GeorgeS2019 does it work?

@GeorgeS2019
Copy link
Author

@PandoCyclone

I installed the extension to VS2022.
I see the Godot submenu under the Extension Top menu

I provide the Godot exe path to the the Godot Configure submenu

Then I launch Godot (Click)

The Godot exe specified during configure started and run the scene file (chosen)

====> However, the editor did not stop at the BREAKPOINT!!

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Aug 31, 2022

My VS2022 17.4 preview

Not sure if this is related to this bug
Extension stopped working on VisualStudio v17.3.0

@Intrivus
Copy link
Contributor

Intrivus commented Aug 31, 2022

So it worked or not xd?
And i think the breakpoint part is a bug from the extension itself

@Intrivus
Copy link
Contributor

btw check this out to be 100% sure
https://github.com/jiiks/godot-csharp-visualstudio

@GeorgeS2019
Copy link
Author

Just so we are on the same page.

There is no more Play in Editor button
There is no more extra steps we need to do a few months back

Now, we define the godot exe path and Luanch Godot.

@Intrivus
Copy link
Contributor

Just so we are on the same page.

There is no more Play in Editor button There is no more extra steps we need to do a few months back

Now, we define the godot exe path and Luanch Godot.

Yes but there is some problem as i mentioned here #32 (comment) which should make it even better

@Intrivus
Copy link
Contributor

By making icon for the button and make the button replaced with the Debug one or at least in the tool bar

@GeorgeS2019
Copy link
Author

I suggest U do a gif animated showing that it debug and stop at BreakPoints

@Intrivus
Copy link
Contributor

I suggest U do a gif animated showing that it debug and stop at BreakPoints

The breakpoints bug is from the plugin itself not because this PR

@GeorgeS2019
Copy link
Author

Is the breakpoints bug VS2022 version dependence?

If yes, showing that it works now with other version of VS2022 will also help a lot.
We need the breakpoints <=== to work

@GeorgeS2019
Copy link
Author

I will be away. Thanks for the effort of sharing.
I compile https://github.com/jiiks/godot-csharp-visualstudio

Godot run from VS2022 but NOT breakpoint
This version is GoDot and not Godot

@Intrivus
Copy link
Contributor

For me I don't even know what breakpoints are but you can ask everyone or just watch youtube videos they show that breakpoints bug not work and some workaround for that too. Here is a video for example: https://www.youtube.com/watch?v=lOjOb4Lv_ww&list=WL&index=2&t=992s&ab_channel=FinePointCGI

@Intrivus
Copy link
Contributor

I will be away. Thanks for the effort of sharing. I compile https://github.com/jiiks/godot-csharp-visualstudio

Godot run from VS2022 but NOT breakpoint This version is GoDot and not Godot

Try my fix i sent upthere which fix the bug showing GoDot replaced with Godot and other enhance please check this #32 (comment) comment and support for better PR

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Aug 31, 2022

The old version, a few months back, the breakpoint WORKs BUT extra steps just to make it works

https://www.youtube.com/watch?v=lOjOb4Lv_ww&list=WL&index=2&t=992s&ab_channel=FinePointCGI

YES, this was the old way and I was able to make breakpoint work. ==> BUT it is NOT reliable.

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Sep 1, 2022

I assume this is @Jiiks 's plan

From @neikeq: Better IDE support by default, less features need to be implemented in Godot IDE extensions. Projects would be runnable by default as they would be executable rather than library C# projects. A Godot extension would only need to add the more fancy features like Play in Editor.

Summary

Debug targets

  • Play in Editor
    Launches the game in the Godot editor for debugging in Visual Studio.
    For this option to work, a running Godot instance must be editing the project.
  • Launch
    Launches the game with a Godot executable for debugging in Visual Studio.
    Before using this option, the value of the "executable" property must be changed
    to a path that points to the Godot executable that will be launched.
  • Attach
    Attaches to a running Godot instance that was configured to listen for a debugger connection.

@GeorgeS2019
Copy link
Author

Information provided by Neikeq how to get the extension to work with Godot4

Side note, think I've asked this before maybe, do you know of any way to attach a C# debugger to the C# module code in godot on Linux? To be able to set breakpoints in the modules/mono .cs files, run the editor and step through things? I feel like the answer is no, it seems to be possible on Windows with VS but no Linux tool I've tried is capable of the same "mixed mode" debugging magic that MS have.

I don't know about mixed mode, but for C# only I can do this in Rider:

  • Add New Cofiguration: .NET Executable
    • Exe path: Path to Godot executable
    • Program arguments: --path /path/to/godot/project/
    • Runtime: .NET / .NET Core

I tried this with VSCode, but I don't remember if it worked:

{
    "name": ".NET Core Launch (console)",
    "type": "coreclr",
    "request": "launch",
    "program": "Path to Godot executable",
    "args": ["--path", "/path/to/godot/project/"],
    "stopAtEntry": false,
    "console": "internalConsole"
}

As for Windows and Visual Studio, you must add the following to your csproj (or a Directory.Build.props):

  <PropertyGroup>
    <StartAction>Program</StartAction>
    <StartProgram>C:\Path\To\Godot.exe</StartProgram>
    <StartArguments>--path C:\Path\To\Godot\Project\</StartArguments>
  </PropertyGroup>

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Sep 1, 2022

From neikeq: The root of the issue applies to Godot 4 as well. However, there are other challenges as well, like how to implement Play in Editor with the CoreCLR debugger.

Debugging CoreCLR

"To debug this project, configure it to use the 'Managed (CoreCLR)' debugger." when trying to debug multi target framework in .NET Core

Visual Studio managed debugger

How to: Specify Debugger Settings

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Sep 4, 2022

case ExecutionType.Launch:

var processStartInfo = new ProcessStartInfo(GetGodotExecutablePath())
{
    string workingDir = startInfo.WorkingDirectory;

    Arguments = $"--path {workingDir} --remote-debug {host}:{remoteDebugPort} {godotStartInfo.StartArguments}", // TODO: Doesn't work with 4.0dev. Should be tcp://host:port which doesn't work in 3.2...
    WorkingDirectory = workingDir,
    RedirectStandardOutput = true,
    RedirectStandardError = true,
    UseShellExecute = false,
    CreateNoWindow = true
};

case ExecutionType.PlayInEditor:

var godotMessagingClient = GodotPackage.Instance.GodotSolutionEventsListener?.GodotMessagingClient;

// TODO: Read the editor player stdout and stderr somehow

case ExecutionType.Attach:

_attached = true;
StartConnecting(godotStartInfo);

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Sep 4, 2022

Command line options

Command line options that can be included in godotStartInfo.StartArguments

Debug options

Standalone tools

Running a specific Scene :

Feature Request: 'Play Scene' from Visual Studio

Debugging a specific Scene

Running/Debugging a specific script

@Intrivus
Copy link
Contributor

Intrivus commented Sep 4, 2022

Umm, so there is a way to change GoDot to Godot
But I need help with how to open a PR

@Intrivus
Copy link
Contributor

Intrivus commented Sep 4, 2022

I have some suggestions

image

This Launch make it Godot cuz it is Godot not GoDot :)
And you can add the Godot icon for the Godot menu and its Launch button
And make the launch button save the current scene before launch?

image

You can replace the debug button(the one that have C# text thingy) with your launch button with the Godot Engine icon
Edit: I found a workaround for have launch with Godot in tool bar but there is no icon there so adding Godot Engine icon might look great

image

Or place a Godot button next to the live share button cuz it is more efficient

And btw what is the use of the configure button

@Intrivus
Copy link
Contributor

Intrivus commented Sep 4, 2022

I have some suggestions

image

This Launch make it Godot cuz it is Godot not GoDot :) And you can add the Godot icon for the Godot menu and its Launch button And make the launch button save the current scene before launch?

image

You can replace the debug button(the one that have C# text thingy) with your launch button with the Godot Engine icon Edit: I found a workaround for have launch with Godot in tool bar but there is no icon there so adding Godot Engine icon might look great

image

Or place a Godot button next to the live share button cuz it is more efficient

And btw what is the use of the configure button

Btw this is the suggestions so anyone like it could help

@Intrivus
Copy link
Contributor

Intrivus commented Sep 4, 2022

@GeorgeS2019 I think you could close this Issue because it is not necessary anymore.

You could go to the latest PR and tell ppl abt ur suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants