DEBUGGING HELP

I am evaluating your component library as a replacement to a VB6-like scripting solution we have been using for many years. Your library and demos look very extensive and impressive, but I have run into a few issues that I’d appreciate some help with.
I make reference to your “Debug My Script” quick-start project here to illustrate my issues.

1)You can only start one instance of the executable and when trying to run a second instance the code fails on the line:
DebuggerCommunication.StartServer(…)
I can prevent things from failing by changing the ipcPortName and ipcObjectUri values but how should these parameters be used correctly? Should you create an ipcPortName that includes some unique identifier such as the exes process ID? Do you have an example of how to be able to run and debug multiple instances of an application? I assume that ipc refer to inter-process communication between the application and the external debugger.
2)I want to use the Extensibility Studio as the debugger (and code editor) rather than having separate tools. When I change the code to do this, things seem to work OK but I see that the ipc code included in the Script Debugger is missing from the Extensibility Studio, can you simply cut and paste this across? Are there any other gotchas with this approach?
3)I get quite often get the following error when trying to run script debugging from within VS2017 whereas things work fine when I run the application directly. I have tried running VS2017 with Admin privileges but that didn’t help, any ideas what the problem is?
System.Runtime.InteropServices.COMException (0x8013132E): This process has already been attached.
Thanks in advance.
Hi,
Thank you for your interest in our product. Please find my answers below:
1.In DebugMyScript demo you can supply IpcPortName/IpcPortUrl as a command line parameters, which will allow debugging multiple instances of that application.
Otherwise default values will be used (in the later case you will not be able to debug two instances).
Here is a simple change to DebugMyScript project, where default values are set to unique identifiers:
private string ipcPortName = "ScriptDebuggerIpcServer" + Guid.NewGuid().ToString();
private string ipcObjectUri = "ScriptDebuggerRemoteControl" + Guid.NewGuid().ToString();

2. IPCPort code should have been moved to Extensibility Studio, this has been overlooked. I'm uploading modified version of Extensibility Studio and DebugMyScript project that should work together:
http://www.alternetsoft.com/forum/AlterNET_Debugger.zip
http://www.alternetsoft.com/forum/AlterNET_Debugger_WithDlls.zip
As for functionality of these two projects, Extensibility Studio application is a super-set of Script Debugger, as it supports better code editing and can open design files, the Script Debugger has been provided as a tool to be used with Scripter project alone.
3. This is Windows limitation, which we can not do much about. There could be only one debug process attached to an application process (managed or unmanaged, does not matter), therefore if you're debugging your application with Visual Studio, Script Debugger/ Extensibility Studio fails to attach to it.
For your information, we have just published a blog related to other known limitations of .NET script debugger, please have a look here:
http://www.alternetsoft.com/blog/known-issues-of-net-script-executing-and-debugging
regards,
Andrew
Thanks, for the information and the new version of Extensibility Studio. However, when I try to compile the projects things fail with error messages about not being able to open the editor assembly.
Any ideas?
If I delete the information in licenses.licx then the projects compile but do not run because of the licenses not being found.
Hi,
I have answered you via email.
regards,
Andrew
Yes you did, thanks for the great support.
I modified the source code as you suggested and now things are working a treat. Multiple instances of the test app communicating with the full Extension studio.