Enable debug mode of Lua scripts for this client. */
| 1861 | |
| 1862 | /* Enable debug mode of Lua scripts for this client. */ |
| 1863 | void ldbEnable(client *c) { |
| 1864 | c->flags |= CLIENT_LUA_DEBUG; |
| 1865 | ldbFlushLog(ldb.logs); |
| 1866 | ldb.conn = c->conn; |
| 1867 | ldb.step = 1; |
| 1868 | ldb.bpcount = 0; |
| 1869 | ldb.luabp = 0; |
| 1870 | sdsfree(ldb.cbuf); |
| 1871 | ldb.cbuf = sdsempty(); |
| 1872 | ldb.maxlen = LDB_MAX_LEN_DEFAULT; |
| 1873 | ldb.maxlen_hint_sent = 0; |
| 1874 | } |
| 1875 | |
| 1876 | /* Exit debugging mode from the POV of client. This function is not enough |
| 1877 | * to properly shut down a client debugging session, see ldbEndSession() |
no test coverage detected