Shravan
Shravan

Reputation: 21

how to debug .net dll when ivoked from vbscript file

I created my .net class library, I have registsred the assembly and I am invoking the methods in the .net class library from VB Script file, I want to debug the code in the class library when methods are invoked from vb script file.

Could you please help in doing the above

Upvotes: 2

Views: 645

Answers (4)

carlsb3rg
carlsb3rg

Reputation: 772

Why not add a "Debug" property which gives you verbose exception handling and diagnostic output to file/event log?

It's probably the easiest option.

Upvotes: 0

Pondidum
Pondidum

Reputation: 11617

If you have the source code for the .net DLL (and from the sounds of it you do), you can add this to the beginning of where you want to debug:

Debugger.Launch()

This will cause a dialog to be shown when that line is hit allowing you to pick an instance of Visual Studio to debug with. From there you can step through the code as normal.

Upvotes: 1

mattythomas2000
mattythomas2000

Reputation: 601

Visual studio has an attach to proccess option in the debug menu. If you use this and select the process that the vbscript is running you should be able to debug it.

Upvotes: 0

Hans Olsson
Hans Olsson

Reputation: 54999

I'm not sure if that's possible. You can set Visual Studio up to debug a Class library via an executable, but I don't think it allows a script and I'm not sure if there's some way to get around that.

If you don't actually need the script and would be happy to just debug it manually you can do it via The Immediate Window as described on this page Debugging DLL Projects. There might be something else on that page that would help you find out how to do it from a script as well.

Upvotes: 0

Related Questions