Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Log showing in HEX mode.
Log showing in HEX mode. [message #44594] Mon, 13 April 2015 10:38 Go to next message
rxantos is currently offline  rxantos
Messages: 72
Registered: October 2011
Member
When I press Alt-L to read the log of the program being debugged, I am presented with an HEX editor view.

Is there a way to get out of the HEX view and look at the log files the way it was before?
Re: Log showing in HEX mode. [message #44595 is a reply to message #44594] Mon, 13 April 2015 10:43 Go to previous messageGo to next message
rxantos is currently offline  rxantos
Messages: 72
Registered: October 2011
Member
Never mind. The solution is Edit->"Edit as text". Don't know why the IDE thought that the log was a binary file.
Re: Log showing in HEX mode. [message #44596 is a reply to message #44595] Mon, 13 April 2015 15:25 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello rxantos,

Some times ago I reported my thoughts about "Hex View". It is very similar to you - why we want to edit in binary mode text files.

More information you can find on upp redmine:
- http://www.ultimatepp.org/redmine/issues/1030#change-2187

Sincerely & thanks for reporting this issue,
Klugier


U++ - one framework to rule them all.

[Updated on: Mon, 13 April 2015 15:26]

Report message to a moderator

Re: Log showing in HEX mode. [message #44597 is a reply to message #44595] Mon, 13 April 2015 19:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
rxantos wrote on Mon, 13 April 2015 10:43
Never mind. The solution is Edit->"Edit as text". Don't know why the IDE thought that the log was a binary file.


Well, the detection is quite simple: If it contains chars <32 other than \t \n \r, it is considered binary.

Anyway, I am running to the same issues with .log from time to time (it is quite easy for some <32 chars to 'escape' into the .log), so I agree that this still needs some tuning.... Perhaps further detection based on extension would help here or something like that.
Re: Log showing in HEX mode. [message #44599 is a reply to message #44597] Tue, 14 April 2015 21:41 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Mirek,

OK, I see that detection is implemented (and it works correctly), but it is not used by idebar. It means that user can view every file in binary mode even ".cpp" or ".txt".

To prevent that we can check in ide/idebar.cpp (line 182) that file is binary. Code:
	if(editfile.GetCount() && editashex.Find(editfile) < 0 && FileIsBinary(editfile))
		menu.Add(AK_EDITASHEX, THISBACK(EditAsHex));


Probably, we should check it only once per file. Above solution can slow down edit bar appearance. It mostly depends on how FileIsBinary is implemented.

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Tue, 14 April 2015 21:51]

Report message to a moderator

Re: Log showing in HEX mode. [message #44607 is a reply to message #44599] Fri, 17 April 2015 10:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Why would we want to limit that? What is wrong with viewing .cpp file in binary?

Sometime I need that even now... (until I have integrated binary view mode, I did this in external tool...)

Mirek
Re: Log showing in HEX mode. [message #44609 is a reply to message #44607] Fri, 17 April 2015 16:47 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Mirek,

Now, I understand the concept. I hardly ever used hex editors or viewers. So, I am definitely not an expert. But, can you tell me for what reason do I need to edit .cpp files in hex editor? I always thought that hex editor is used to edit pure binary files like .exe or .out.

The only issues I founded in HexView is edit bar menu generation. More information you can find on redmine.

Sincerely,
Klugier
Re: Log showing in HEX mode. [message #44610 is a reply to message #44609] Sun, 19 April 2015 07:02 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Klugier wrote on Fri, 17 April 2015 16:47
Hello Mirek,

Now, I understand the concept. I hardly ever used hex editors or viewers. So, I am definitely not an expert. But, can you tell me for what reason do I need to edit .cpp files in hex editor? I always thought that hex editor is used to edit pure binary files like .exe or .out.



For example: .cpp file is generated by code or adopted from public domain, there is some string in it and it contains invalid utf-8 sequence. You might need hexview to find out what is going on (what bytes exactly are there).

Mirek
Previous Topic: Add "pre-compile" as custom build step
Next Topic: [BUG?] Copy as definition/declaration
Goto Forum:
  


Current Time: Fri Mar 29 16:36:11 CET 2024

Total time taken to generate the page: 0.01919 seconds