-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
375 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
344 changes: 344 additions & 0 deletions
344
pr-preview/pr-75/community/training/debugging/square-numbers-r-debug.cast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,344 @@ | ||
{"version": 2, "width": 80, "height": 24, "timestamp": 1724309699, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} | ||
[0.00455, "o", "\u001b[!p\u001b[?3;4l\u001b[4l\u001b>\u001b[?1049h\u001b[22;0;0t\u001b[4l\u001b[?1h\u001b=\u001b[0m\u001b(B\u001b[1;24r"] | ||
[0.006336, "o", "\u001b[H\u001b[2J\u001b[H\u001b[2J\u001b[23B\u001b[7m \u001b[H\u001b[27m\u001b[23B\u001b[7m \u001b[H\u001b[27m\u001b[23B\u001b[7m "] | ||
[0.006552, "o", " \u001b[H\u001b[27m\u001b[23B\u001b[7m \u001b[H\u001b[27m\u001b[H\u001b[2J\u001b[23B\u001b[7m \u001b[H\u001b[27m\u001b[23B\u001b[7m \u001b[H\u001b[27m"] | ||
[0.09039, "o", "\u001b[22;2t\u001b]2;(x1::debugging)\u0007\u001b[1m\u001b[32m(x1::debugging)\u001b[0m "] | ||
[0.304088, "o", "R"] | ||
[0.415607, "o", " "] | ||
[0.531889, "o", "-"] | ||
[0.672262, "o", "-"] | ||
[0.806414, "o", "v"] | ||
[0.926004, "o", "a"] | ||
[1.043039, "o", "n"] | ||
[1.173584, "o", "i"] | ||
[1.283196, "o", "l"] | ||
[1.416635, "o", "l"] | ||
[1.56413, "o", "a"] | ||
[1.877132, "o", "\r\n"] | ||
[1.971441, "o", "\nR version 4.1.2 (2021-11-01) -- \"Bird Hippie\"\r\nCopyright (C) 2021 The R Foundation for Statistical Computing\r\nPlatform: x86_64-pc-linux-gnu (64-bit)\r\n\n"] | ||
[1.971559, "o", "R is free software and comes with ABSOLUTELY NO WARRANTY."] | ||
[1.978739, "o", "\r\nYou are welcome to redistribute it under certain conditions.\r\nType 'license()' or 'licence()' for distribution details.\r\n\n"] | ||
[1.978835, "o", " Natural language support but running in an English locale"] | ||
[1.978916, "o", "\r\n\nR is a collaborative project with many contributors.\r\nType 'contributors()' for more information and\r\n'citation()' on how to cite R or R packages in publications.\r\n\n"] | ||
[1.978976, "o", "Type 'demo()' for some demos, 'help()' for on-line help, or\r\n'help.start()' for an HTML browser interface to help.\r\nType 'q()' to quit R.\r\n\n"] | ||
[2.034508, "o", "> "] | ||
[2.86178, "o", "s"] | ||
[2.967229, "o", "o"] | ||
[3.089083, "o", "u"] | ||
[3.233999, "o", "r"] | ||
[3.369285, "o", "c"] | ||
[3.486092, "o", "e"] | ||
[3.622908, "o", "("] | ||
[3.734226, "o", "\""] | ||
[3.838529, "o", "s"] | ||
[3.946974, "o", "q"] | ||
[4.064265, "o", "u"] | ||
[4.18749, "o", "a"] | ||
[4.301131, "o", "r"] | ||
[4.442219, "o", "e"] | ||
[4.552575, "o", "_"] | ||
[4.659398, "o", "n"] | ||
[4.763779, "o", "u"] | ||
[4.893945, "o", "m"] | ||
[5.037252, "o", "b"] | ||
[5.167748, "o", "e"] | ||
[5.314534, "o", "r"] | ||
[5.451162, "o", "s"] | ||
[5.594524, "o", "."] | ||
[5.741346, "o", "R"] | ||
[5.868718, "o", "\""] | ||
[6.015841, "o", ")"] | ||
[6.341221, "o", "\r\n"] | ||
[6.344886, "o", "> "] | ||
[6.568, "m", "Set a breakpoint"] | ||
[7.28264, "o", "s"] | ||
[7.416226, "o", "e"] | ||
[7.533014, "o", "t"] | ||
[7.678574, "o", "B"] | ||
[7.791643, "o", "r"] | ||
[7.909016, "o", "e"] | ||
[8.022578, "o", "a"] | ||
[8.140504, "o", "k"] | ||
[8.24114, "o", "p"] | ||
[8.372651, "o", "o"] | ||
[8.487062, "o", "i"] | ||
[8.590615, "o", "n"] | ||
[8.721881, "o", "t"] | ||
[8.830896, "o", "("] | ||
[8.946638, "o", "\""] | ||
[9.068739, "o", "s"] | ||
[9.176684, "o", "q"] | ||
[9.287765, "o", "u"] | ||
[9.411795, "o", "a"] | ||
[9.535745, "o", "r"] | ||
[9.64875, "o", "e"] | ||
[9.763848, "o", "_"] | ||
[9.878487, "o", "n"] | ||
[9.991631, "o", "u"] | ||
[10.116163, "o", "m"] | ||
[10.227031, "o", "b"] | ||
[10.351718, "o", "e"] | ||
[10.464431, "o", "r"] | ||
[10.60671, "o", "s"] | ||
[10.715636, "o", "."] | ||
[10.85902, "o", "R"] | ||
[10.96863, "o", "\""] | ||
[11.10657, "o", ","] | ||
[11.23705, "o", " "] | ||
[11.347725, "o", "l"] | ||
[11.486073, "o", "i"] | ||
[11.59877, "o", "n"] | ||
[11.703644, "o", "e"] | ||
[11.834519, "o", " "] | ||
[11.961648, "o", "="] | ||
[12.093746, "o", " "] | ||
[12.202604, "o", "1"] | ||
[12.315274, "o", "7"] | ||
[12.449695, "o", ","] | ||
[12.554616, "o", " "] | ||
[12.698691, "o", "v"] | ||
[12.820439, "o", "e"] | ||
[12.951302, "o", "r"] | ||
[13.067187, "o", "b"] | ||
[13.176404, "o", "o"] | ||
[13.277364, "o", "s"] | ||
[13.38834, "o", "e"] | ||
[13.532154, "o", " "] | ||
[13.681061, "o", "="] | ||
[13.803397, "o", " "] | ||
[13.922746, "o", "F"] | ||
[14.036735, "o", "A"] | ||
[14.185012, "o", "L"] | ||
[14.288165, "o", "S"] | ||
[14.409133, "o", "E"] | ||
[14.517603, "o", ")"] | ||
[14.83011, "o", "\r\n"] | ||
[14.835182, "o", "> "] | ||
[15.722028, "o", "m"] | ||
[15.849793, "o", "a"] | ||
[15.968532, "o", "i"] | ||
[16.094208, "o", "n"] | ||
[16.211254, "o", "("] | ||
[16.325508, "o", ")"] | ||
[16.640188, "o", "\r\u001b[1;23r\u001b[23;1H\n"] | ||
[16.658652, "o", "square_numbers.R#17\r\nCalled from: find_squares(1, 100)\r\nBrowse[1]> "] | ||
[17.58767, "o", "v"] | ||
[17.732139, "o", "a"] | ||
[17.879699, "o", "l"] | ||
[17.981337, "o", "u"] | ||
[18.127805, "o", "e"] | ||
[19.235087, "o", "\r\n[1]"] | ||
[19.235175, "o", " 1\r\nBrowse[1]> "] | ||
[21.287437, "o", "s"] | ||
[21.395783, "o", "q"] | ||
[21.512685, "o", "u"] | ||
[21.63194, "o", "a"] | ||
[21.749592, "o", "r"] | ||
[21.875549, "o", "e"] | ||
[21.976246, "o", "s"] | ||
[23.0988, "o", "\r\nNULL\r\nBrowse[1]> "] | ||
[23.548, "m", "Step into `is_square()`"] | ||
[25.151027, "o", "s"] | ||
[25.476148, "o", "\r\n"] | ||
[25.476372, "o", "debug: if (is_square(value)) {\r\n squares <- c(squares, value)\r\n}\b\n"] | ||
[25.476583, "o", "Browse[2]> "] | ||
[26.483369, "o", "s"] | ||
[26.832082, "o", "\r\n"] | ||
[26.847086, "o", "debugging in: is_square(value)\r\ndebug at square_numbers.R#26: {\r\n for (i in seq(value)) {\r\n if (i * i == value) {\r\n return(TRUE)\r\n }\r\n }\r\n FALSE\r\n}\b\nBrowse[3]> "] | ||
[27.737967, "o", "n"] | ||
[28.071989, "o", "\r\n"] | ||
[28.072078, "o", "debug at square_numbers.R#27: for (i in seq(value)) {\r\n if (i * i == value) {\r\n return(TRUE)\r\n }\r\n}\b\nBrowse[3]> "] | ||
[29.076572, "o", "n"] | ||
[29.411181, "o", "\r\n"] | ||
[29.411507, "o", "debug at square_numbers.R#28: "] | ||
[29.411565, "o", "if (i * i == value) {\r\n return(TRUE)\r\n}\b\nBrowse[3]> "] | ||
[29.654, "m", "Return from `is_square()`"] | ||
[30.435409, "o", "n"] | ||
[30.738328, "o", "\r\n"] | ||
[30.738441, "o", "debug at square_numbers.R#29: return(TRUE)\r\nBrowse[3]> "] | ||
[31.761898, "o", "n"] | ||
[32.092409, "o", "\r\n"] | ||
[32.092437, "o", "exiting from: "] | ||
[32.092524, "o", "is_square(value)\r\ndebug at square_numbers.R#18: squares <- c(squares, value)\r\nBrowse[2]> "] | ||
[32.954507, "o", "n"] | ||
[33.293211, "o", "\r\n"] | ||
[33.293317, "o", "debug at square_numbers.R#20: value <- value + 1\r\nBrowse[2]> "] | ||
[33.505, "m", "Show updated `squares` list"] | ||
[34.163351, "o", "s"] | ||
[34.312893, "o", "q"] | ||
[34.452296, "o", "u"] | ||
[34.595714, "o", "a"] | ||
[34.719919, "o", "r"] | ||
[34.828623, "o", "e"] | ||
[34.955549, "o", "s"] | ||
[36.07832, "o", "\r\n"] | ||
[36.078469, "o", "[1] 1\r\nBrowse[2]> "] | ||
[36.528, "o", "\u001b[s\u001b[24;1H\u001b[7m the value of squares has changed! \u001b[m\u001b[u"] | ||
[38.131156, "o", "c"] | ||
[38.444153, "o", "\r\n"] | ||
[38.444245, "o", "square_numbers.R#17\r\nCalled from: "] | ||
[38.444297, "o", "find_squares(1, 100)\r\nBrowse[1]> "] | ||
[39.492837, "o", "v"] | ||
[39.628324, "o", "a"] | ||
[39.764841, "o", "l"] | ||
[39.901651, "o", "u"] | ||
[40.027996, "o", "e"] | ||
[41.13825, "o", "\r\n"] | ||
[41.138383, "o", "[1] 2\r\nBrowse[1]> "] | ||
[43.190236, "o", "s"] | ||
[43.325996, "o", "q"] | ||
[43.472941, "o", "u"] | ||
[43.622595, "o", "a"] | ||
[43.748148, "o", "r"] | ||
[43.886045, "o", "e"] | ||
[44.017067, "o", "s"] | ||
[45.124471, "o", "\r\n[1] 1\r\n"] | ||
[45.124585, "o", "Browse[1]> "] | ||
[45.574, "o", "\u001b[s\u001b[24;1H\u001b[7m \u001b[m\u001b[u"] | ||
[47.176419, "o", "Q"] | ||
[47.521424, "o", "\r\n"] | ||
[47.521515, "o", "> "] | ||
[47.751, "m", "Add a conditional breakpoint"] | ||
[48.480604, "o", "s"] | ||
[48.589214, "o", "e"] | ||
[48.696994, "o", "t"] | ||
[48.80528, "o", "B"] | ||
[48.949426, "o", "r"] | ||
[49.074369, "o", "e"] | ||
[49.191722, "o", "a"] | ||
[49.341928, "o", "k"] | ||
[49.469452, "o", "p"] | ||
[49.584842, "o", "o"] | ||
[49.703955, "o", "i"] | ||
[49.838891, "o", "n"] | ||
[49.945227, "o", "t"] | ||
[50.083748, "o", "("] | ||
[50.228099, "o", "\""] | ||
[50.352037, "o", "s"] | ||
[50.47386, "o", "q"] | ||
[50.581507, "o", "u"] | ||
[50.702747, "o", "a"] | ||
[50.841454, "o", "r"] | ||
[50.962346, "o", "e"] | ||
[51.093814, "o", "_"] | ||
[51.196355, "o", "n"] | ||
[51.307591, "o", "u"] | ||
[51.418031, "o", "m"] | ||
[51.567649, "o", "b"] | ||
[51.669802, "o", "e"] | ||
[51.781139, "o", "r"] | ||
[51.882983, "o", "s"] | ||
[52.015879, "o", "."] | ||
[52.148397, "o", "R"] | ||
[52.266042, "o", "\""] | ||
[52.368102, "o", ","] | ||
[52.489718, "o", " "] | ||
[52.598758, "o", "l"] | ||
[52.720445, "o", "i"] | ||
[52.83964, "o", "n"] | ||
[52.95058, "o", "e"] | ||
[53.092932, "o", " "] | ||
[53.228037, "o", "="] | ||
[53.351909, "o", " "] | ||
[53.472059, "o", "2"] | ||
[53.57811, "o", "0"] | ||
[53.708697, "o", ","] | ||
[53.833803, "o", " "] | ||
[53.979878, "o", "t"] | ||
[54.1286, "o", "r"] | ||
[54.268838, "o", "a"] | ||
[54.412825, "o", "c"] | ||
[54.537633, "o", "e"] | ||
[54.656639, "o", "r"] | ||
[54.781081, "o", " "] | ||
[54.907596, "o", "="] | ||
[55.048962, "o", " "] | ||
[55.156612, "o", "q"] | ||
[55.286897, "o", "u"] | ||
[55.432484, "o", "o"] | ||
[55.54468, "o", "t"] | ||
[55.659697, "o", "e"] | ||
[55.801914, "o", "("] | ||
[55.935148, "o", "i"] | ||
[56.083958, "o", "f"] | ||
[56.216197, "o", " "] | ||
[56.364006, "o", "("] | ||
[56.505431, "o", "v"] | ||
[56.639482, "o", "a"] | ||
[56.749378, "o", "l"] | ||
[56.860467, "o", "u"] | ||
[57.003772, "o", "e"] | ||
[57.120596, "o", " "] | ||
[57.255117, "o", "="] | ||
[57.377252, "o", "="] | ||
[57.500282, "o", " "] | ||
[57.601036, "o", "4"] | ||
[57.74248, "o", "9"] | ||
[57.858314, "o", ")"] | ||
[57.97551, "o", " "] | ||
[58.079556, "o", "b \b"] | ||
[58.211079, "o", "r"] | ||
[58.350429, "o", "o"] | ||
[58.476235, "o", "w"] | ||
[58.600882, "o", "s"] | ||
[58.739262, "o", "e"] | ||
[58.844809, "o", "r"] | ||
[58.972202, "o", "("] | ||
[59.109927, "o", ")"] | ||
[59.228463, "o", ")"] | ||
[59.372722, "o", ","] | ||
[59.496124, "o", " "] | ||
[59.601956, "o", "v"] | ||
[59.751576, "o", "e"] | ||
[59.874262, "o", "r"] | ||
[60.012181, "o", "b"] | ||
[60.116483, "o", "o"] | ||
[60.25698, "o", "s"] | ||
[60.364876, "o", "e"] | ||
[60.47172, "o", " "] | ||
[60.585706, "o", "="] | ||
[60.707447, "o", " "] | ||
[60.831903, "o", "F"] | ||
[60.953303, "o", "A"] | ||
[61.055954, "o", "L"] | ||
[61.185817, "o", "S"] | ||
[61.323568, "o", "E"] | ||
[61.472923, "o", ")"] | ||
[62.601588, "o", "\r\n"] | ||
[62.645289, "o", "> "] | ||
[66.654799, "o", "m"] | ||
[66.765057, "o", "a"] | ||
[66.868912, "o", "i"] | ||
[66.977638, "o", "n"] | ||
[67.115364, "o", "("] | ||
[67.228527, "o", ")"] | ||
[67.534651, "o", "\r\n"] | ||
[67.551885, "o", "Called from: eval(expr, p)\r\nBrowse[1]> "] | ||
[67.77, "m", "Stop at the conditional breakpoint"] | ||
[68.522321, "o", "v"] | ||
[68.670681, "o", "a"] | ||
[68.787303, "o", "l"] | ||
[68.897257, "o", "u"] | ||
[69.00444, "o", "e"] | ||
[70.152773, "o", "\r\n"] | ||
[70.152878, "o", "[1] 49\r\nBrowse[1]> "] | ||
[72.205565, "o", "s"] | ||
[72.316534, "o", "q"] | ||
[72.460451, "o", "u"] | ||
[72.563346, "o", "a"] | ||
[72.682565, "o", "r"] | ||
[72.802687, "o", "e"] | ||
[72.952042, "o", "s"] | ||
[74.098063, "o", "\r\n"] | ||
[74.098181, "o", "[1] 1 4 9 16 25 36 49\r\nBrowse[1]> "] | ||
[74.546, "o", "\u001b[s\u001b[24;1H\u001b[7m the value of squares has changed! \u001b[m\u001b[u"] | ||
[74.546, "m", "Continue until the script ends"] | ||
[76.148542, "o", "c"] | ||
[77.285765, "o", "\r\n"] | ||
[77.287026, "o", " [1] 1 4 9 16 25 36 49 64 81 100\r\n> "] | ||
[78.137, "o", "\u001b[s\u001b[24;1H\u001b[7m \u001b[m\u001b[u"] | ||
[81.341221, "o", "q"] | ||
[81.476015, "o", "("] | ||
[81.602225, "o", ")"] | ||
[81.947227, "o", "\r\n"] | ||
[81.965089, "o", "\u001b[1m\u001b[32m(x1::debugging)\u001b[0m "] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,6 @@ is_square <- function(value) { | |
FALSE | ||
} | ||
|
||
main() | ||
if (! interactive()) { | ||
main() | ||
} |
Oops, something went wrong.