sarbian

KSP Plugin debugging and profiling for Visual Studio and Monodevelop on all OS

Recommended Posts

11 hours ago, NermNermNerm said:

you get pdb2mdb with your unity installation

I have not tested it in a long time but that one used to not properly work on Roslyn generated dlls.

Share this post


Link to post
Share on other sites
On 12/20/2018 at 11:10 AM, sarbian said:

I have not tested it in a long time but that one used to not properly work on Roslyn generated dlls.

Just did - doesn't work.  WTH.  These are grownups making Unity right?  Stick with your version.

Share this post


Link to post
Share on other sites
On 3/30/2015 at 12:01 AM, Teknoman117 said:

Okay, so, just my luck it doesn't work for me...

Did everything you said, got the "development version" watermark in the KSP window and everything. However, nothing happens when I try to attach to the process (I'm guessing it failed to attach). However, it sometimes opens the developer console with a long list of the same message about failing to wait on a semaphore (something which seemed to be mentioned in angavrilov's commit log for his debugger. If i try to set a breakpoint anywhere, a couple seconds later mono pops up a dialog with "Debug operation failed." I verfied that in this case I hit attach before the connection timed out.

This is what the executable spits out for me as well.

 

 

Set current directory to /home/nathaniel/Projects/ksp/0.90.0
Found path: /home/nathaniel/Projects/ksp/0.90.0/KSP.x86_64
Mono path[0] = '/home/nathaniel/Projects/ksp/0.90.0/KSP_Data/Managed'
Mono path[1] = '/home/nathaniel/Projects/ksp/0.90.0/KSP_Data/Mono'
Mono config path = '/home/nathaniel/Projects/ksp/0.90.0/KSP_Data/Mono/etc'
PlayerConnection initialized from /home/nathaniel/Projects/ksp/0.90.0/KSP_Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55502
Multi-casting "[IP] 192.168.1.69 [Port] 55502 [Flags] 3 [Guid] 661409256 [EditorId] 803286173 [Version] 1048832 [Id] LinuxPlayer(192.168.1.69) [Debug] 1" to [225.0.0.222:54997]...
Waiting for connection from host on [192.168.1.69:55502]...
Timed out. Continuing without host connection.
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56256
PlayerConnection already initialized - listening to [192.168.1.69:55502]

 

I did have a similar problem to this.

For anyone who is having the problem of clicking on "Attach Unity Debugger" and not having any unity instances listed and not being able to attach.

You need to press on "Open Log File".

Then you need to look for the line :

Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56900

The last value on that line in this case 56900 is the port you need to connect to.

Please be aware that so far the port changes from run to run.  Perhaps there is a way to stabilize it that some of the ppl more familiar with Unity have found out?

Anyway if you go to "Attach Unity Debugger", and then "Input IP", specify your PC's IP then use the port 56900 in this case, whatever the port number in the log file specifies.  You can then debug your KSP mod.

I hope this saves someone some time and ball ache.

Gavin786

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now