You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -41,35 +43,18 @@ to toggle native (default is native enabled).
41
43
### To run local copy of js-slang
42
44
43
45
1. Follow the instructions on the js-slang repository to transpile your own copy
44
-
2. Edit line 41 of package.json in this project to link to the directory of your js-slang and then run `npm install`:
46
+
2. Edit line 41 of package.json in this project to link to the directory of your js-slang and then run `yarn`:
45
47
46
48
`"js-slang": "file:path/to/js-slang",`
47
49
48
50
Note that this copies your files over, any future changes will not be reflected.
49
51
50
52
You may try [this](https://medium.com/@alexishevia/the-magic-behind-npm-link-d94dcb3a81af) for a smoother experience.
51
53
52
-
## Inspector
53
-
This requires the use of the `debugger` branch of js-slang to work. Clone both the frontend and the `debugger` slang to the same directory. You would want to `yarn build` the slang you just obtained and then `yarn && sudo yarn start` in the frontend and it should just work. The merge over there is still ongoing. Meanwhile, please try to break this.
54
-
55
-
The mental model we are using is: A breakpoint means that the interpreter will stop right before it. Whatever is highlighted is going to be evaluated next. If you meet any inconsistencies with this, also please raise it up for discussion.
56
-
57
-
### What you can do
58
-
- Set breakpoints by clicking on the gutter
59
-
-`debugger;` just like ECMAScript
60
-
- Inspect!
61
-
- Run stuff in the context of the paused program!
62
-
63
-
### Usage
64
-
Here's what happens: After you click run, if there the interpreter meets a breakpoint, the first thing you're going to notice is that the REPL feedbacks to you it hit a breakpoint, the line is highlighted, and one of the icons on the right pane is going to start blinking. If you click on the icon, it reveals the inspector. All the variables in every frame is exposed here. The REPL is also now in the context of where ever you are. So you can evaluate anything you would normally be able to in the REPL. It is all quite simple really.
65
-
66
-
### Note
67
-
Because we use a local version of `js-slang`, the CI just breaks all the time.
68
-
69
54
## For Editing And Creating New Local XML Missions
70
55
71
56
1. Use the branch 'mission-editing' in cadet-frontend
0 commit comments