How to jump in codeblocks from log to source file - codeblocks

Is there a way like in Visual Studio to jump from a output log to a source file ?
In VS it is possible to write to debug log with a special syntax like :
__FILE__(__LINE__): some logging text in my C++ file.
and with a double click jump to that source file.

No, that is not possible in Code::Blocks.

Related

how to remove shortcut file in visual source safe 2005

How to Remove in following shortcut symbol in visual source safe file
Use 'Branch files':
P.S.: I hope you understand, what this shortcut symbol means and how behavior changed after branching. If not, better read something about this topic: e.g.: https://msdn.microsoft.com/en-us/library/y90e01b4(v=vs.80).aspx

How do I log Visual Studio 2017 build output to a file?

I have my Visual Studio 2017 build logging set to Diagnostics mode, but the logging to the Output pane is truncated after a while so I don't get to see the whole log, which is of little use to me.
How do I redirect this to an external file, or increase the buffer size for the Output pane? The nearest answer I have from Stackoverflow is that the logging automatically goes to a file in the 'output' folder, whatever that is.
TIA.
There is an extension by Microsoft available for VS 2017 that allows you to do configure logging for both normal builds as well as design-time builds (those that are used to determine project/solution structures and are used for the editing experience) at https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProjectSystemTools
This extension will add a new tool window "Build Logging" that allows you to capture binary logs of builds:
These logs can be explored with the Binary and Structured Log Viewer.
I don't know of a way to increase the buffer size of the output window. I have never heard of that option.
Inside of visual studio, when you build, it will only output to the debug output window. So there also no option to output instead to a file.
However if you compile with the command line, using msbuild.exe, you can log to a file while simultaneously outputing to the terminal window. This is how I set up all my builds. I output minimal output to the terminal window, while outputing much more verbose information to a file.
-verbosity:minimal -filelogger -fileloggerparameters:Verbosity=Diagnostic;LogFile=mybuild.log
More here:
https://msdn.microsoft.com/en-us/library/ms164311.aspx

How to use Visual Studio tabs to input command-line arguments into your build in debug configuration?

I need to debug my program by inputting command-line arguments (like switches) and jog my program to the break points.
I have tried to put my commands in the Build tab because I think it is related to link->compile->build->module. But I was wrong, I got exit 9009 error code!
There it is -->
It is not in the build tab. It is inside a debug tab on Project Properties when you right-click on your project in your solution explorer.

visual studio, compile with a parameter

I have a program that creates a C# class from a text file. The line is:
D:\work> gppg /nolines RealCalc.txt > RealCalc.cs
Can I say Visual Studio to execute this line whenever I hit build or run because it is very annoying to do that in terminal before each run
PS: The reason for creating C# clas from text file is because I use a lexer and a parser for something like defining my own pogramming language. And gppg transforms a text gramatic into C# code
You can have a pre-build event.
Go to the project property pages - in the Build Events page.

In Visual Studio when viewing a changeset, how can I change the view of cs files?

In Visual Studio with TFS as source control, when I view the history and double click a cs file, the file is loaded in notepad. How can i change the application to be notepad++?
I also would like the OS's default application for the file to still be visual studio
After pouring over ProcessMonitor logs I think I found the solution!
You need to change the what the Windows shell (explorer) thinks the "Edit" action for text files. I was able to change this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\text\shell\edit\command
to something other than Notepad (in my case notepad2). Now Visual Studio's TFS's changeset dialog opens cs files with that editor.
This will probably change the edit option for not just cs files, but everything considered "text'. The registry entries for file associations are pretty complicated. I suspect that it would be possible to disassociate .cs files from this common "text" category and make this change only for cs files (but I'm not that ambitious). Also, I wouldn't be surprised if people's file associations / shell commands (open, edit, etc...) vary from machine to machine (OS versions, tools installed, etc) - so YMMV.
The only way I found is to replace notepad with notepad++. This article describes how to do it. Don't forget to check the comments to get a link to the "little exe" that comes with notepad++.
Works like a charm on W7 x64.
Cheers,
Phil
\I was able to configure this by adding new value to the registry.
OS: Windows 7 Enterprise x64
Steps on how to do it.
Run: Regedit (alt + r, type regedit)
Look for HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations
Right click "SystemFileAssociation" -> add new key then name it as .cs
Right click .cs and add new key then name it as shell
Right click shell and add new keys name it as edit and open 6
Right click edit and add new key command then change the default value to point to the file exe you want it to run.
ex: C:\Program Files (x86)\Notepad++\notepad++.exe %1
Don't forget to add the %1 at the end of the .exe
do the same for open
Hope it helps.
I don't see any options in Visual Studio for changing that, so I'm guessing it uses the system's default text editor.
Try assigning Notepad++ as the default handler for *.cs files.
You can do this from withing Notepad++ by going to Settings/Preference/File Association.
You can also do it by right-clicking on a .cs file in explorer, go to Open With/Choose Program..., then select Notepad++ and check the "Always use the selected program to open this kind of file" box before hitting OK.
The only thing that works for me is when I set the default program for the particular file type in Windows Explorer to open with the VS IDE:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
This opens the code in a new instance of VS. Not ideal, but at least it's easier to read.

Resources