diff --git a/README.md b/README.md index 0019059..a224ea1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,42 @@ +# !Please Read! + +In node 7.7 release the api for the debugger changed and we did not yet mangage to update the plugin accordingly +In order for this plugin to work use 7.6 version of node get it from [npm][npm] +If you don't want to configure nvm to work with the debugger or your affraid you could break your current setup, +just download the binary to your desktop. +```bash +~/Desktop/node-v7.6.0-darwin-x64/bin/node --debug-brk examples/qqq.js +``` +You could put an alias into your zshrc/bashrc/fishrc +This alias works assuming you put the node file you downloaded from [npm][npm] onto your desktop +If you want to place it somewhere else update the path accordingly +```bash +alias node7.6="~/Desktopnode-v7.6.0-darwin-x64/bin/node --debug-brk" +``` +If this does not work for you please consider to open an issue , join our [slack][slack] chatroom or talk to us on twitter and ask your question there. +We are always happy to help. + +# Test Coverage + +| User | Platform | Status | +|---|---|---| +| Mac OS X 10.12.6 Node 7.6 Vim 8.0| [Anzumana](https://github.com/anzumana) | + +| Linux Node Node 6.2 Vim 8.0 |User | + | +| Linux Node Node 6.2 Neovim 0.2.2 |User | - | + +# Contributors + +| User | Code | Docs | Continuous Integration | Testing | Test Coverage | +| --- | --- | --- | +|[sidorales](https://github.com/sidorares)| ʘ‿ʘ |ʘ‿ʘ| +|[anzumana](https://github.com/anzumana)||ʘ‿ʘ| +|[baopham](https://github.com/baopham)||ʘ‿ʘ| +|[coderofsalvation](https://github.com/coderofsalvation)||ʘ‿ʘ| +|[gitter-badger](https://github.com/gitter-badger)||ʘ‿ʘ| +|[mynameiscoffey](https://github.com/mynameiscoffey)||ʘ‿ʘ| +|[adambiggs](https://github.com/adambiggs)||ʘ‿ʘ| +|[bitdeli-chef](https://github.com/bitdeli-chef)||ʘ‿ʘ| + [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=sidorares&url=https://github.com/sidorares/node-vim-debugger&title=node-vim-debugger&language=&tags=github&category=software) node-vim-debugger @@ -160,3 +199,8 @@ Move up one stack frame. - [ndb](https://github.com/smtlaissezfaire/ndb) - [node-profiler](https://github.com/bnoordhuis/node-profiler) - [v8.log processor](https://github.com/sidorares/node-tick) + +[gitter]: https://badges.gitter.im/Join +[slack]: https://javascriptvimdebugger.slack.com/ +[npm]: https://nodejs.org/dist/v7.6.0/ +[testing_breakpoints]: docs/testing.md#SetBreakpoint diff --git a/TODO.txt b/TODO.txt index e4f2799..4f806bd 100644 --- a/TODO.txt +++ b/TODO.txt @@ -4,3 +4,10 @@ - repl DSL https://github.com/sidorares/node-vim-debugger/issues/11 - user configured actions on startup/step/break + +- when you are in -nb mode with vim and open another file and you press the keyboard combination for stack frame up +TypeError: Cannot read propert 'dc'of undefined + +include +https://github.com/kentcdodds/all-contributors/blob/master/README.md +into the repo diff --git a/artwork/javascript-vim-debugger.png b/artwork/javascript-vim-debugger.png new file mode 100644 index 0000000..0f5b667 Binary files /dev/null and b/artwork/javascript-vim-debugger.png differ diff --git a/artwork/javascript-vim-debugger.sketch b/artwork/javascript-vim-debugger.sketch new file mode 100644 index 0000000..295088b Binary files /dev/null and b/artwork/javascript-vim-debugger.sketch differ diff --git a/docs/roadmap.md b/docs/roadmap.md new file mode 100644 index 0000000..41e7852 --- /dev/null +++ b/docs/roadmap.md @@ -0,0 +1 @@ +This road map is in no way set in stone for now its just a collection of things that we stil want to do. diff --git a/docs/testing.md b/docs/testing.md new file mode 100644 index 0000000..8d5b821 --- /dev/null +++ b/docs/testing.md @@ -0,0 +1,34 @@ +# Integrationtests + +#### vim.keys.break + + Add a breakpoint at current line and column. + +#### vim.keys.continue + + Resume program execution until the next breakpoint is encountered, or the program terminates. + +#### vim.keys.down + + Move down one stack frame. + +#### vim.keys.in + + Step inside the current statement's execution. + +#### vim.keys.next + + Step to the next statement. + +#### vim.keys.out + + Step out of the current statement. + +#### vim.keys.up + + Move up one stack frame. + + +# Unit Tests + +# EndToEnd Test diff --git a/examples/knobelSolution.js b/examples/knobelSolution.js new file mode 100644 index 0000000..e1ca252 --- /dev/null +++ b/examples/knobelSolution.js @@ -0,0 +1,296 @@ +var result=[]; +var result2= []; +//--------------------------------------- +// Data definition +//--------------------------------------- +class Card { + constructor(left,right,top,bottom) { + this._left = left; + this._right = right; + this._top= top; + this._bottom = bottom; + } + get right(){ + return this._right; + } + set right(value){ + this._right = value; + } + get left(){ + return this._left; + } + set left(value){ + this._left = value; + } + get top(){ + return this._top; + } + set top(value){ + this._top = value; + } + get bottom(){ + return this._bottom; + } + set bottom(value){ + this._bottom = value; + } +} +Card.prototype.toString = function dogToString() { + var convert = function convert(number){ + const blueFront = 11; + const blueBack = -11; + const purpleFront = 12; + const purpleBack = -12; + const grayFront = 15; + const grayBack = -15; + const redFront = 16; + const redBack = -16; + switch(number){ + case blueFront : + return 'blueFront'; + case blueBack: + return 'blueBack'; + case purpleFront: + return 'purpleFront'; + case purpleBack: + return 'purpleBack'; + case grayFront: + return 'grayFront'; + case grayBack: + return 'grayBack'; + case redFront: + return 'redFront'; + case redBack: + return 'redBack'; + default: + return "error in element"; + } + } + var result = '(' + this.left + ' ' + this.right + ' ' + this.top + ' ' + this.bottom + ')'; + return result; +} +class Game { + constructor(cardsArray) { + this.cards=cardsArray; + } +} + + +//--------------------------------------- +// Function Defintions +//--------------------------------------- +/** + * Rotate the card clockwise (to the right ) + * @param card + * +*/ +function rotateCard(card,j){ + //console.log('rotateCard'); + //console.log(card); + var tmp = Object.assign({},card); + + switch (j){ + case 0: + return card; + case 1: + card.top = tmp.left; + card.right = tmp.top; + card.bottom = tmp.right; + card.left = tmp.bottom; + return card; + case 2: + card.right = tmp.left; + card.bottom = tmp.top; + card.left = tmp.right; + card.top = tmp.bottom; + return card; + case 3: + card.bottom = tmp.left; + card.left = tmp.top; + card.top = tmp.right; + card.right = tmp.bottom; + return card; + default: + return card; + } +} +//print each array permutation of the game array +/** + * returns an array that contains every permutation of our game array + * @param game array initial game array + * @return array containing every permuation of the game array + * +*/ +function print(array, n){ + if(array.length==1) { + //return n.push(array[0]); + //var tmp = n.slice(); + //tmp.push(array[0]); + //result.push(tmp); + //return result.push(n.push(array[0])); + //var arr3 = n + //console.log(n); + //return result.push(n); + //var tmp = n.concat(array); + //result.push(tmp); + result.push(n.concat(array[0])); + //result.push(array[0]); + return ; + + //return result.push(n + "," + array[0]+ "this"); + //result.push(n); + //return result.push(n,array[0]); + //return result.push(array[0]); + } + for(var i = 0;i