Help!!! How do I debug an Add-In

Ok, so I'm admittedly new to RMS. Can anyone tell me a good way to debug an add-in written in VB.Net.

I simply cannot find a way to make this happen. There has got to be a solution to this.

The add-in is getting called, I've verified that by writing events to the event log in my add-in code. What I am doing is setting my Visual Studio

2003 debugging startup properties to launch POSUSER.EXE. I then hit F5 to start debugging. IIt seems to launch correctly, and as soon as the add-in is about to be called, Visual Studio looks like it is going to step into my code, but then the debugger stops and the POSUSER.EXE process goes way.

Any suggestions?

Thanks.

Reply to
Larry Andersen
Loading thread data ...

It sounds like you have the environment right. Try creating a trivial projust that does nothing but show a message box and see if you can debug into that - at least that will tell you if there is a problem in your environment or in your project.

Reply to
Glenn Adams [MVP - Retail Mgmt]

During development, I always just use MsgBoxes to pop up with variables and indicate which code is executed.

You could also code your add-in to generate a debugging log file.

Reply to
Jason Hunt

Ok, so I created a new project that does nothing more than display a message box. The message box appears just fine if I run RMS normally, so all is working well as far as my code executing.

HOWEVER, It's still a no-go as far as debugging. Again, whenever I launch POSUSER from Visual Studio and the add-in gets called, Visual Studio acts like it is going to stop at my breakpoint, but then the debugger stops and the POSUSER.EXE executable shuts down.

Any other ideas? Is there no debugging support for Hooks through RMS? If so, I can't believe there would be any sort of real market for extending this product as it is too frustrating to do anything with it. Should I be looking for a different solution for my clients?

Here is the exact project code:

Imports System.Runtime.InteropServices

_

Public Class AddItemHook

Public Function Process(ByVal session As Object) As Boolean

MsgBox("Test")

End Function

End Class

I have the compile options set to "Register for COM interop"

"Glenn Adams [MVP - Retail Mgmt]" wrote in message news: snipped-for-privacy@TK2MSFTNGP12.phx.gbl...

Reply to
Larry Andersen

Seriously, this can't be the only solution, can it? If so, then Microsoft needs to get their butts in gear cause it is rather pathetic.

Reply to
Larry Andersen

Well, I don't know what the problem is, but I think it's in your visual studio environment. I debug add-ins in exactly the manner you are attempting all the time. If you want, zip up the test project & solution and send it to me at the address below - I'll see if I can find any strange settings...

You can open a support request with MS Tech support - select the "Customization Guide" topic - but this really looks like a visual studio thing to me...

Reply to
Glenn Adams [MVP - Retail Mgmt]

I would appreciate any help at this point. Here is the zip file with the project. As you can see, there is nothing to it but a message box.

"Glenn Adams [MVP - Retail Mgmt]" wrote in message news: snipped-for-privacy@TK2MSFTNGP12.phx.gbl...

begin 666 RMSHookTest.zip M4$L#!!0````(`.!F6S/SX??HZ@$``!0$```;````4DU32&]O:U1E#J&I:H4 L)*U6PKD0@`)&RLR#\P1BL4MD` M&0JT@PN:BYJ%8&O%5$-Z@K0V!,Z>&G!?N@$.)-B0#``#_#0``'@```%)-4TAO;VM497-T M+U)-4TAO;VM497-T+G9BN19*D;)*$'IA@U(1 MU/5A+TYRDGIU[,AVT+)IWWUV`BH7)T W:?53L'\G_N>/+Z_*RBFI4/#9' 7MZCVXI9I#%4/E6J$^8A4MT:]A-//@$7F%%-].JM M9OVBV>MM4([W`A':@-KU9G5OCKL$^WKPU\CN-D==^[+6[]C-6J??[-?Z=JM3 M:P][HU:GV[^XN+K]O8J_?GN--4PP\34AU&L0S/#XL7LI.QZ.W MPWT0"$IF(21,8WF5;J0=)^J1+ZI-2ZW]:!4+@0(=5_;\._$4=L$WA+>K M/Z?:]@-V)W5C:W; 2;L%NCX>056!K!GGECR9G2K W(B(B4+Z]Y+'H#K.W8!O M1/3

Reply to
Larry Andersen

I unzipped you files, double clicked the project to open it in VS, set a breakpoint on the MsgBox line, set up my registry to call your hook and ran the project. POS opened and I added an item to the transaction. The project stopped at the breakpoint as expected.

I really think your problem is in your Visual Studio environment. Do you have another system you could test on? This was the first project I've opened in VS since switching to a new laptop, so my VS install is very clean and very basic. I didn't do anything special to enable debugging and I didn't change your project in any way.

You might want to run some diagnostics on your dev machine - you could have a memory problem...

Reply to
Glenn Adams [MVP - Retail Mgmt]

I never got it to work any other way, and I always use VB6 for add-in's that get executed through a hook.

Reply to
Jason Hunt

Hmmmm.

This is a brand spanking new laptop with 1gig ram on it. Don't think ram is a problem (at least I hope not). Don't have much on this laptop either except Visual Studio 2003, SQL Server, and a few misc tools (winamp, rssbandit, office, etc.)

Now I'm completley lost.

Guess I'm screwed. Anyone at MS ever gander at these newsgroups? Sure would love some pointers on what else I should be checking for.

Thanks for all the help Glenn. It is much appreciated.

"Glenn Adams [MVP - Retail Mgmt]" wrote in message news:% snipped-for-privacy@TK2MSFTNGP15.phx.gbl...

Reply to
Larry Andersen

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.