vfsfitvnm / frida-il2cpp-bridge

A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.
https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki
MIT License
1.06k stars 204 forks source link

Code Completion and Intellisense Issues with frida-il2cpp-bridge in Visual Studio Code #448

Open ghost opened 11 months ago

ghost commented 11 months ago

When using frida-il2cpp-bridge, I encounter issues with code completion, intellisense, and errors related to missing member properties (Property does not exist on type {}).

Problem Overview Upon integrating frida-il2cpp-bridge into my project via npm, I noticed that it behaves differently compared to other libraries. Specifically, I'm facing issues with code completion and intellisense within Visual Studio Code. Whenever I attempt to access certain members or properties, I receive errors indicating that these properties do not exist on the type.

Screen Shoot

image

Working 100% for other Libraries this is working 100% for Frida's JS API within same project , same .ts file. Code Intellisense is working 100% for libraries excluding frida-il2cpp-bridge

image

Expected Behavior I expected frida-il2cpp-bridge to provide complete code hints, intellisense, and proper property recognition within my development environment, similar to other libraries I've used. However, this behavior seems to be absent or inconsistent, resulting in errors during development.

Installation

 npm -i frida-il2cpp-bridge

Additional Information Code completion and Intellisense is working for other libraries. I've ensured that the library was installed correctly and is up to date. I am using TypeScript file for coding my stuff, (.ts)

Project's Packag.json file

{
  "name": "frida-agent-example",
  "version": "1.0.0",
  "description": "Example Frida agent written in TypeScript",
  "private": true,
  "keywords": [
    "frida",
    "il2cpp",
    "dump",
    "trace",
    "global-metadata"
  ],
  "main": "agent/index.ts",
  "scripts": {
    "prepare": "npm run build",
    "spawn": "frida -U Gadget -l _agent.js",
    "build": "frida-compile agent/index.ts -o _agent.js -c",
    "watch": "frida-compile agent/index.ts -o _agent.js -w"
  },
  "devDependencies": {
    "@types/frida-gum": "^18.4.3",
    "@types/node": "^18.19.3",
    "frida-compile": "^15.0.8",
    "typescript": "^5.3.3",
    "frida-il2cpp-bridge": "^0.9.0"
  },
  "dependencies": {

  }
}

Project's tsconfig.json file:

{
  "compilerOptions": {
    "target": "es2020",
    "lib": ["es2020"],
    "allowJs": true,
    "noEmit": true,
    "strict": true,
    "esModuleInterop": true,
    "declaration": true,
    "experimentalDecorators": true,
    "sourceMap": true,
    "stripInternal": true,
  }
}

Environment Details:

image

vfsfitvnm commented 11 months ago

Uhm, would you try using the setup here?

ghost commented 11 months ago

Uhm, would you try using the setup here?

I've done the setup as described but nothing works for me. after troubleshooting of 2 days I reported this issue on GitHub repo. I described this issue in Frida's Telegram Channel but nobody had any idea about the solution.

Recently I noticed that when I use .JS file to code instead of .TS file the VS Code never show any error but the code intellisense and auto completion still remains disabled for this library, this is just like ignoring the errors - not helpful

expectedfailure commented 8 months ago

Uhm, would you try using the setup here?

I've done the setup as described but nothing works for me. after troubleshooting of 2 days I reported this issue on GitHub repo. I described this issue in Frida's Telegram Channel but nobody had any idea about the solution.

Recently I noticed that when I use .JS file to code instead of .TS file the VS Code never show any error but the code intellisense and auto completion still remains disabled for this library, this is just like ignoring the errors - not helpful

Hardly relevant, but I found a solution. You need to delete the file tsconfig.json, and reinitialize the project through the terminal with the command tsc -init After that autocompletion and highlighting will work correctly.