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 DebugStepOverDemo() {
    Column(
        modifier = Modifier.fillMaxSize().padding(16.dp),
        verticalArrangement = Arrangement.spacedBy(16.dp)
    ) {
        // 测试
        Button(
            onClick = {
                testDebug()
            }

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

        Text( "调试步骤\n" +
                    "testDebug()\n" +
                    "  //不进入testOverGrandfather方法内部\n" +
                    "  testOverGrandfather();//测试步过断点-开始\n" +
                    "  print(\"测试步过断点-结束\");//测试步过断点-结束\n"+
                    "}",
            fontSize = 8.sp)


    }

}

/****测试步过****/
fun testDebug(){
    //不进入testOverGrandfather方法内部
    testOverGrandfather();//测试步过断点-开始
    print("测试步过断点-结束");//测试步过断点-结束
}



/***通用测试方法**/
private fun testOverGrandfather(){
    testOverFather();
}

 fun testOverFather(){
    testOverKid();
}

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


