71

I have a bin file holding all my instruction cache and data cache for my Verilog project, and I want to see it as the Notepad++ hex editor shows its meaning, hex representation view. Is there a way to configure this?

Or maybe an extension that provides this functionality?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
bubismark
  • 861
  • 1
  • 6
  • 8
  • 2
    Asking for external links is off topic. Besides, it's easy to find [an extension for vscode that does what you want](https://marketplace.visualstudio.com/items?itemName=slevesque.vscode-hexdump) –  Aug 11 '16 at 20:16
  • no i tried that extension and it doesnt let me see a .bin file also if you have a way to make it work without external extension it will be much better – bubismark Aug 11 '16 at 20:27
  • You want https://marketplace.visualstudio.com/items?itemName=slevesque.vscode-hexdump – Benjamin Pasero Aug 14 '16 at 17:28
  • 10x but as i said before it translate string to hex format and not a bin file . also it cant process big files (6mb) – bubismark Aug 14 '16 at 22:38

3 Answers3

59
  1. Install this extension: Hexdump for VSCode. It can display a specified file in hexadecimal.

  2. Open the file/image/whatever you want to display in hex mode in Visual Studio Code, then press Ctrl + Shift + Alt + H. That's it.

  3. Or press Ctrl + P then input Show hexdump from path to open a file in hex mode directly.

bluppfisk
  • 2,538
  • 3
  • 27
  • 56
Kouga
  • 708
  • 5
  • 9
58

VSCode 1.46 (May 2020) will have its own native Hex Editor extension:

Hex Editor

With the custom editor API finalized with support for binary editors, we have developed a hex editor extension to provide a native hex editing experience.

https://media.githubusercontent.com/media/microsoft/vscode-docs/vnext/release-notes/images/1_46/hex-editor.gif

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Unfortunately, this doesn't necessarily solve the problem of viewing a binary file as it doesn't work if the file isn't writable. – Jesper Matthiesen Nov 14 '22 at 12:58
  • 1
    @JesperMatthiesen I did not realize that. A possible workaround would be to copy/duplicate the file, taking ownership and making that copy writable. – VonC Nov 14 '22 at 13:29
4

Hexdump has been deprecated. The alternative right now is Hex Editor by Microsoft.

Hex Editor OR ext install ms-vscode.hexeditor

Ahmad Bader
  • 150
  • 2
  • 10