Search Unity

  1. How has 2019.2 and the beta been for you so far? Give us feedback in this thread.
    Dismiss Notice

When C# Replaces Typescript how will we debug?

Discussion in 'Project Tiny' started by TheRoccoB, Dec 11, 2018.

  1. TheRoccoB

    TheRoccoB

    Joined:
    Jun 29, 2017
    Posts:
    54
    Great job on the preview launch! I love the fast iteration times to the browser, and I'm really looking forward to a built-in auto-reload.

    One problem with the WebGL target was very limited debugging capabilities after compilation. I noticed that right now the Typescript code seems to be in mostly-readable format in my browser's developer tools.

    When you make the switchover to C#, what is the plan for debugging? Will there be some kind of source-mapping from WASM back to C#?

    Thanks!
     
  2. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    2,960
    When they switch to C# it'll hopefully be a moot point, as then we might be running the Tiny project directly in the engine while testing. The exported code will be pointless to debug once they make that switch, so that's at least what seems most reasonable.
     
  3. etienne_unity

    etienne_unity

    Unity Technologies

    Joined:
    Aug 31, 2017
    Posts:
    54
    Hi @TheRoccoB and @orb

    At first you'll be able to debug C# builds natively on PC (as orb hinted), but we're also working on a C# soft debugger implementation for browsers that support WebAssembly and threads. You'll be able to debug C# by attaching your IDE to a running development build in supported browsers.

    Also, from C#, you'll be able to PInvoke JavaScript. In this context you'll then have to use you browser dev tools to debug.

    We're looking for feedback on this workflow, so if you have any concerns please let us know!
     
  4. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    2,960
    You give us everything, basically? I think people will like that.
     
  5. TheRoccoB

    TheRoccoB

    Joined:
    Jun 29, 2017
    Posts:
    54
    Cool, that sounds like a good workflow! Looking forward to it.

    I'm actually mostly a web programmer by trade, so enjoying the Typescript at the moment :). Too bad it won't stick around, but I understand how C# will better fit into the entire ecosystem.