Sign in to follow this  
dodheim

VS.NET Error List - Messages?

Recommended Posts

Hi! In VS we have an Error List window with three buttons: Errors, Warnings, Messages. I've seen pragma's to send output to the Errors and Warnings tabs, but I can't send any to the Messages tab. I would expect #pragma message("...") to do this, but it only shows up in the Output window. Anyway, I've never ever seen any messages under the Messages tab, it has been always empty [(0) Messages]. Then what's the point of it? It would be great to see my TODO's in the Messages tab. Any ideas? thx, d0d

Share this post


Link to post
Share on other sites
You can see your TODO's in the Task list (View/Task List or View/Other Windows/Task List) window. Any comment that begins with TODO, HACK, etc. will show up in the task list. If you double-click on the task in the task list, it will take you to the corresponding line of code.

As for the Messages tab, that is for informational messages output by the build process (of which there are normally zero).

Share this post


Link to post
Share on other sites
Yeah, but the task list shows the TODO's only for the currently open file. Unless it has an option to show all TODO's it's not what I want.

It would be cool to imitate those informational messages that the build process would normally emit. In this way I could see all TODO's solution-wide.

Internally VS is parsing the output of the build process and searches for 'error' and 'warning' strings so it can fill the Errors and Warnings tabs. I'm interested in the format it searches for when filling the Messages tab.

Though I haven't found any info about it yet.

thx,
d0d

Share this post


Link to post
Share on other sites
In the meanwhile I came across a thread (google: "vstudio error list messages") with the same question as mine. Someone told the OP that #pragma message("...") should do the job. I tried it once again and it really doesn't show up in the Messages tab.

Am I screwing up something or what? :D

thx,
d0d

Share this post


Link to post
Share on other sites
No, nothing's broken. The message pragma sends output to the Output window, not the Messages list. I was able to correctly format messages via the message pragma and send them to the Errors list and the Warnings list. But no joy when it comes to the Messages list. The documentation shows how to format messages for the Errors/Warnings lists, but mentions nothing about the Messages list.

After poking around MSDN for awhile, I think I found how messages get to the Messages list. If you are creating custom build tools for use in the IDE, you can log errors, warnings and messages via class methods and they will appear under the appropriate tab. I don't think there is a specific message format that will automatically get filtered to the Messages tab. If there is, it doesn't appear to be documented (unlike the warnings/errors formats).

Share this post


Link to post
Share on other sites
Quote:
Original post by dodheim
Now I'm off writing a custom build tool :DD


That sounds like fun! Post back if you get something working. I'd be interested in something like this myself.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this