Giter Club home page Giter Club logo

kaitai_ide_vscode's People

Contributors

brycebarbara avatar fudgepop01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nnguyen259

kaitai_ide_vscode's Issues

can't be selected as a default binary editor

Workbench > Editor > Default binary editor

global & project settings.json should contain option with list of directories for searching .ksy files
for automatic binding using file extension (and best-matching header sections in ideal case)

Can't open a file in the hex editor

I opened the hex editor, right clicked a file (152 KB), and clicked "open file as hex". The hex editor does not react though, and keeps showing nothing.

Looking at the dev console shows this:

grafik

I am running:

  • macOS 10.14.5
  • VSCode 1.36.0

Please tell me if I can provide any further useful information :)

Edit: After the context menu option did not work, I tried the same command from the command palette. Only from that did I get a notification saying that the command failed. In both cases, nothing happened in the hex editor though.

Edit 2: This is how the hex editor looks when opening any file:
grafik

file browsing starts with 0x30 offset

top 3 lines not visible, but cursor moves to this hidden area

can be fixed with manual changing the number of lines in hex browser settings, but does not detects it automatically by hex editor subwindow size

None of the commands work

Using windows 10. The kaitai struct compiler and visualizer were already installed on my system when I installed the vscode extension if that matters. Tried running "compile to target language", "compile and examine ksy", and "open file as hex". None of them work. They all give "command not found" errors.

Code_tM7ev07x6H
Code_JH9JYfjUbx
Code_IYYuExwj9U

Write access?

Have you considered write access to the file, i.e. being able to edit the hex? I realise this can be hard!

KSExplorer is empty

I just installed Kaitai 0.7.0 and followed Usage instructions to open a small jpeg file with ksy file from format gallery and KSExplorer remains empty without any errors/warning (while jpeg is loaded in the hex editor). Any ways to debug/analyze this issue?

nokaitai

Add content menu items not only to the files in "Workspace" area

This is inconvenient -- sometimes you want to open a file not from the workspace, but neither the tab menu nor the "Open Editors" menu have any extension menu items.

In any case I suggest to rework how extension is work. Just add one command "Parse with KSY" that will apply to the active buffer. In that command ask what KSY to use. I suggest to show selector (similery to the select command "Ctrl+Shift+P") with variants:

  • Configured (see below)
  • Open KSY file...
  • <...list of opened editors...>

Also add extension setting with KSY associations to the file glob patterns (usually something like "<ksy path>": "*.ext"). Show this variant as "Configured"

License?

I looked for a license for this repo in all the standard places, but I didn't see one. Can you add a license file? GitHubs docs may help. Thank you.

Release artifacts (*.vsix) should not be in the repository, but in the 'Releases' section

You can tag specific commits in your repository with the respective version numbers, create releases from those tags and then attach the vsix file there. You can also include the relevant part of the change log as a description.

(Documentation: https://help.github.com/en/articles/creating-releases)

This way, the repository stays light and only contains the actual source files used to build the .vsix files.

Error with KS definition: TypeError: Cannot read properties of null (reading 's$1')

I'm getting the error Error with KS definition: TypeError: Cannot read properties of null (reading 's$1') with any .ksy file when trying to 'compile and examine ksy' or just 'compile to target language' (I tried ts, js, python)
I tried with the example from the readme below as well as the gif example on [http://kaitai.io]

seq:
  - id: no_subregions
    type: u4
  - id: has_subregions
    type: example_type
types:
  example_type:
    seq:
      - id: first_child
        type: u4
      - id: second_child
        type: u2

kaitai struct vscode version v0.9.0
VScode information:
Version: 1.80.1 (user setup)
Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771
Date: 2023-07-12T17:22:07.651Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621

Runtime errors are not properly propagated

While working on reverse-engineering a file format, I noticed that the extension sometimes just stops working. After undoing change after change I found out that the issues was a missing case in a type switch, I simply had not implemented the case yet. But the extension never told me that there was an issue with an invalid type. It just stopped working and VSCode reported it hanging after a while.

Is there a way to get proper runtime errors as they would be generated by the Kaitai runtime when parsing a file? At least I assume that you'd get an error for a missing case when parsing a file in your target language? (I haven't gotten that far yet with my file format)

Issues using relative paths in kaitai templates

When using binary files that include other binary files, like media/standard_midi_file.ksy which include /common/vlq_base128_be, it fails with an error like:

TypeError: Cannot convert undefined or null to object
at Function.keys ()
at $c_sjs_js_WrappedDictionary$DictionaryIterator.init___sjs_js_Dictionary (c:\Users\per.nerseth\Development\kaitai_ide_vscode\node_modules\kaitai-struct-compiler\kaitai-struct-compiler.js:38435:27)
at $c_Lio_kaitai_struct_format_JavaScriptKSYParser$.yamlJavascriptToScala__O__O (c:\Users\per.nerseth\Development\kaitai_ide_vscode\node_modules\kaitai-struct-compiler\kaitai-struct-compiler.js:7830:71)

The reason is that the compiler expects imports to be absolute paths and not relative paths.
The only fix I found was to copy the file into the same base path and import it like this:
imports:
- vlq_base128_be

Otherwise the extension seem to work fine !

Problems in VSCode with this extension.

Hi,

I saw this plugin and wanted to try it out. I really like the concept. I'm having a few problems with this extension.

I created a file called uniquename.ksy with the contents:

meta:
  id: rifx
  endian: le
seq:
  - id: magic
    contents: "RIFX"
  - id: container_len
    type: s4

First I got errors with uniquename not defined. Those disappeared while trying to reproduce it for this issue.
Now it will only show magic 'Uint8Array' in the KSExplorer. The container_len won't show up.

What's going on?

Publish on open-vsx.org

Hello. Have you considered publishing this extension on open-vsx.org? This would enable easy use on vscodium, which uses that site instead of the MS extension marketplace by default.

Many thanks for this extension.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.