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
import androidx.compose.ui.unit.sp

@Composable
internal fun DebugStepIntoDemo() {
    Column(
        modifier = Modifier.fillMaxSize().padding(16.dp),
        verticalArrangement = Arrangement.spacedBy(16.dp)
    ) {

        // 测试
        Button(
            onClick = {
                testIntoDebug()
            }

        ) {
            Text("触发断点", color = Color.White)
        }

        Text( "调试步骤\n" +
                "测试包含3层方法\n" +
                "第一层：testIntoGrandfather\n" +
                "第二层：testIntoFather，被testIntoGrandfather包含\n" +
                "第三层：testIntoKid，被testIntoFather包含\n" +
                "fun testIntoGrandfather(){\n"+
                "    fun testIntoFather(){ \n" +
                "      fun testIntoKid(){\");\n" +
                " 。         print(\"测试步进断点-结束\");" +
                "        }\n" +
                "    }\n" +
                "}",
            fontSize = 12.sp)

    }

}

/****测试步过****/
fun testIntoDebug(){
    testIntoGrandfather()
}


/***通用测试方法**/
fun testIntoGrandfather(){
    testIntoFather();// 测试步进断点-开始
}

fun testIntoFather(){// 测试步进断点-进入方法
    testIntoKid();//  测试步进断点-结束
}

fun testIntoKid(){
    print("测试步进断点-结束");// print("测试步进断点-结束");
}


