# Strange bug with “MessageName[a,b] is not of the form symbol::name ”, Debugger & cursor location

Can someone confirm/disconfirm this?

1. Start Mathematica 11, blank notebook, blank init.m
2. Start the Debugger/make sure it is running. It doesn't seem to matter whether you have the Stack and Breakpoints window open too or not. The "Break at ... []" checkboxes can also be checked or not. But uncheck them for now.
3. Enter

a::b

4. Place the cursor at any of the locations indicated with | in the following:

a|:|:|b

5. Press shift enter.

6. The message

Message::name: Message name MessageName[a,b] is not of the form symbol::name or symbol::name::language.

will be displayed.

This seems to have other ways of triggering that seem pretty much random, but this method seems reliable.

Do I maybe have some state left from version 10.4 that causes this or does this happen for other people too?

$Version  "11.0.0 for Microsoft Windows (64-bit) (July 28, 2016)" (FalafelPita) According to the documentation, there are two ways to define a message, which I implement as: ClearAll["sym*"]; (*1*) sym1::name1 = "Message 1."; (*2*) MessageName[sym2, "name2"] = "Message 2.";  When I evaluate these with debugger OFF, no errors or messages occur. When I turn debugger ON, restart the kernel, and then evaluate these, the first approach generates an error "Message name MessageName[sym1,name1] is not of the form symbol::name or symbol::name::language" but the second approach does not. I'm running $Version
(*"11.1.0 for Microsoft Windows (64-bit) (March 13, 2017)"*)


Can anyone confirm this? Can anyone see anything incorrect with what I'm doing here? Is this a bug in the debugger?

Maddeningly, the error has been elusively inconsistent. The kernel restart is often NOT necessary to generate the error, but sometimes it has been.

• This problem exists also in 11.1. – C. E. Mar 27 '17 at 16:56
• I can confirm it for "10.4.1 for Microsoft Windows (64-bit) (April 11, 2016)". No idea what it means, though. – aardvark2012 Aug 4 '17 at 0:26
• I answered this question in mathematica.stackexchange.com/questions/153041 before discovering this one. I don't know if we have a convention against closing older questions as duplicates of newer ones... – Itai Seggev Aug 4 '17 at 21:09
• @Itai, you have options: vote to close the unanswered one, transfer your answer to the other one, or (in this case) a mod like me can perform mergers. – J. M. will be back soon Aug 5 '17 at 8:29

This is a bug in the FE. The debug mode is implemented by wrapping pieces of the cell with an extra TagBox so the FE knows where to go when it stops. In the cases where it goes wrong, there is an extra TagBox around "name1", which splits it from the ::. You then end up with MessageName[sym1, name1] instead of MessageName[sym, "name1"] as the input expression.
A possible workaround is to use double quotes around name even when using the short form. I.e., sym1::"name1". This is never wrong, and it makes sure that "name1" gets interpreted as a string even if it is split off from its double colon.