I've been thinking about your problem. You didn't say that adding the "wdebug()" has CAUSED the "exception" problem, but I'm guessing it has.
So if you remove the "wdebug" the problem goes away?
That makes debugging very simple as we know exactly where the problem is - with the debug.
Assuming you know nothing about assembly coding and have just dropped the "wdebug" into the middle of some other code, there are two things that you might have got wrong.
Firstly, the syntax of the wdebug instruction from CFPRM>PDF is "WDEBUG.L <ea>y". In the example I gave it is using an address register to point to the debug data. So you have to select a register to use that is not being used for anything else in the code at the point where you added the instruction. So it is possible that the code is doing something like:
<Load something important into register A0> /* Newly added code */ move.l #debug, a0 wdebug (a0) <Now try to use previous important data in A0>
If that is what has happened you should choose a different register that is not currently in use to replace "a0" in the added wdebug code, or move the code somewhere else.
The other possibility is that you've dropped the "debug data" into the middle of the code. Assembly isn't like "C", where the compiler knows that something like "int nValue" is a declaration of a variable. So if you put the "debug:" and the "wdebug" in line and next to each other it would result in the CPU is trying to execute the 0x2c80, 0x0002, 0x0000, 0x0000" data as instructions. That would be interpreted as "move.l d0, (d6)" followed by 3 unassigned instructions, which would trigger an illegal instruction exception. Is that what you did? If so, move the "debug:" data up higher in the file to where other data is being declared, and before where the code starts.
Tom