package com.dong.demo013.debug

import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

@Composable
internal fun DebugStepDemo() {
    Column(
        modifier = Modifier.fillMaxSize().padding(16.dp),
        verticalArrangement = Arrangement.spacedBy(16.dp)
    ) {
        Text("调试步骤")
        Text("测试包含3层方法")
        Text("第一层：testGrandfather")
        Text("第二层：testFather，被testGrandfather包含")
        Text("第三层：testKid，被testFather包含")
        Text("层级如下")
        Text("fun testGrandfather(){\n" +
                "    fun testFather(){\n" +
                "        fun testKid(){\n" +
                "\n" +
                "        }\n" +
                "    }\n" +
                "}")
        // 测试
        Button(
            onClick = {

            },

            ) {
            Text("step over-步过", color = Color.White)
        }

        Button(
            onClick = {

            },

            ) {
            Text("step into-步进", color = Color.White)
        }

        Button(
            onClick = {

            },

            ) {
            Text("step into-步出", color = Color.White)
        }

    }

}

/****测试步过****/
fun testOver(){
    print("测试步过：跳过下列的方法，不进入testGrandfather")
}



/***通用测试方法**/
fun testGrandfather(){
    print("进入testGrandfather");
    testFather();
    print("离开testGrandfather");
}

fun testFather(){
    print("进入testFather");
    testKid()
    print("离开testFather");
}

fun testKid(){
    print("进入testKid");
    print("离开testKid");
}



fun testOverLevel2(){


}