guild icon
Toit
#How to use 'jag watch' on host ? (solved)
Thread channel in help
kaxori
kaxori 08/22/2023 07:35 PM
jag run test.toit --device host
test

jag watch test.toit --device host
Scanning ...
Error: couldn't find device with name: 'host'
bitphlipphar
bitphlipphar 08/22/2023 07:37 PM
You can start a simulator on host instead.
bitphlipphar
bitphlipphar 08/22/2023 07:37 PM
jag simulate
bitphlipphar
bitphlipphar 08/22/2023 07:37 PM
I think that will just show up when you do jag scan.
bitphlipphar
bitphlipphar 08/22/2023 07:41 PM
Yeah, that seems to work also with jag watch.
kaxori
kaxori 08/22/2023 07:57 PM
it works very nice :🤩:
thank you !
floitsch
floitsch 08/23/2023 09:47 AM
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
kaxori
kaxori 08/23/2023 11:12 AM
:🤔: (I think to be slow on the uptake)
- please give me an example for that
floitsch
floitsch 08/23/2023 11:35 AM
main args: print args
jag run -d host demo.toit -- 1 2 --another-arg
kaxori
kaxori 08/23/2023 11:49 AM
:👍🏻: 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)
kaxori
kaxori 08/23/2023 11:53 AM
there is a jag completion command.
- What is it for ?
- And how can it be used ?
- does a doc exist ?
floitsch
floitsch 08/23/2023 11:57 AM
I think that's for the shell (bash...) So it autocompletes the subcommands (like run).
floitsch
floitsch 08/23/2023 11:58 AM
Jaguar also contains the lsp command which is used by the vscode plugin for completion and diagnostics there.
14 messages in total