2021-10-12 puerts hot update solution, breakpoint debugging process under webstorm

Tencent's hot update solution puerts, the official example is debugging under vscode,

private JsEnv jsEnv;
    async void RunScript()
    {
    
    
        jsEnv = new JsEnv(new DefaultLoader("F:/UnityProjects/puerts_unity_demo-master/TsProj/output"), 8080);
        await jsEnv.WaitDebuggerAsync();
        jsEnv.Eval("require('QuickStart')");
    }

    void Start()
    {
    
    
        RunScript();
    }

    void Update()
    {
    
    
        jsEnv.Tick();
    }

where 8080 is the port number;

  1. Click to add configuration

insert image description here

  1. choose the first

insert image description here
3. Fill in the above port number, select the js directory (use tsc to export js debugging for ts files) insert image description here
4. Start unity and run debug;

Guess you like

Origin blog.csdn.net/weixin_44054505/article/details/120723381