How to use 'jag watch' on host ? (solved)
# help
k
> jag run test.toit --device host test > jag watch test.toit --device host Scanning ... Error: couldn't find device with name: 'host'

https://cdn.discordapp.com/attachments/1143629602615472228/1143629602741293157/2023-08-22_21h33_44.png

k
You can start a simulator on host instead.
Copy code
jag simulate
I think that will just show up when you do
jag scan
.
Yeah, that seems to work also with
jag watch
.
k
it works very nice 🤩 thank you !

https://cdn.discordapp.com/attachments/1143629602615472228/1143635012747542641/image.png

f
Note that you can pass arguments to your application by taking an argument with
main
. Use
--
to tell Jaguar that the arguments are for the Toit program.
jag run -d host foo.toit -- --arg-to-foo
k
🤔 (I think to be slow on the uptake) - please give me an example for that
f
Copy code
main args:
  print args
jag run -d host demo.toit -- 1 2 --another-arg
k
👍🏻 tested and got it. I think the simulation mode (running toit on Host/PC) is VERY helpful to test the behaviour of unknown functions,classes,packages,... (especially when there are no adequate examples)
> there is a
jag completion
command. > - What is it for ? > - And how can it be used ? > - does a doc exist ?
f
I think that's for the shell (bash...) So it autocompletes the subcommands (like
run
).
Jaguar also contains the
lsp
command which is used by the vscode plugin for completion and diagnostics there.
3 Views