This disclosure provides a computer-implemented method for debugging a program including a SQL statement. The method comprises indicating one or more first positions of source code of the program. Each of the one or more first positions corresponds to a fragment of the SQL statement at which a breakpoint can be set. The method further comprises receiving an input of setting breakpoint at one of the one or more first positions. The method further comprises presenting an execution context generated in response to execution of the program reaching a breakpoint set based on the input.