How do I see a bin file in a hex editor in Visual Studio Code?
Asked Answered
A

4

78

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?

Ambages answered 11/8, 2016 at 20:4 Comment(4)
Asking for external links is off topic. Besides, it's easy to find an extension for vscode that does what you wantGantt
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 betterAmbages
You want marketplace.visualstudio.com/…Socialism
10x but as i said before it translate string to hex format and not a bin file . also it cant process big files (6mb)Ambages
A
68

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://static.mcmap.net/file/mcmap/ZG-AbGLDKwftXV-pWS2nZ7-ocVI0bRywWRfQcFyQcC2jaRA/media/microsoft/vscode-docs/vnext/release-notes/images/1_46/hex-editor.gif

Arevalo answered 8/6, 2020 at 18:29 Comment(2)
Unfortunately, this doesn't necessarily solve the problem of viewing a binary file as it doesn't work if the file isn't writable.Aeneid
@JesperMatthiesen I did not realize that. A possible workaround would be to copy/duplicate the file, taking ownership and making that copy writable.Arevalo
T
58
  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.

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

Transpolar answered 16/5, 2017 at 3:27 Comment(5)
Thanks for including the magic keys. I had already installed the extension, but had no idea how to activate it.Antenna
hex dump is good, but it really suffers with larger files and does not allow editing. Is there anything like that?Smith
How do I copy the hex dump without getting stuff like line number and the preview to the right of the hex dump?Rifle
Hexdump is deprecated. They suggest using Hex Editor by microsoft.Blake
this extension is deprecated. Use Hex Editor of VS Code.Crt
P
8

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

Hex Editor OR ext install ms-vscode.hexeditor

Pisolite answered 31/10, 2022 at 17:0 Comment(0)
P
3
  1. Install Hex Editor
  2. Then open the file you want to edit in VS Code
  3. It will say you cannot open the file in here (if it's binary file), Select Open Anyway enter image description here
  4. Select Hex Editor from the Command Panel enter image description here
  5. You should see something similar to this: enter image description here
Padraic answered 12/10, 2023 at 20:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.