Foamy urine in diabetic patients is most likely due to the increased viscosity of urine, which is caused by the increase of urine sugar content and protein content, and the main reasons include poor blood sugar control, caused by medication and kidney disease. 1. Poor blood sugar control: a significant rise in blood sugar leads to an increase in blood sugar content in the urine filtered through the kidneys, which cannot be completely reabsorbed by the kidneys, leading to an increase in the sugar content of the urine and causing the corresponding symptoms. 2. Drug-induced: some people may apply SGLT-2 inhibitor drugs (dagliflozin, etc.), resulting in increased glucose content in the urine, causing corresponding changes. 3. Kidney disease: prolonged failure to control blood glucose can lead to diabetic nephropathy, causing increased renal permeability, resulting in increased protein content in the urine, resulting in corresponding changes. Foam in the urine continues to be unrelieved, you need to consult a doctor in a timely manner, after clarifying the specific causes, under the guidance of the clinician for standardized treatment, to prevent serious irreversible damage.